We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Calendar dates center align in android.

Hey,
i have an issue with sfcalendar. In Android, dates are Aligned on top left corner but i wish it will be in center horizontally and vertically.
Please give me some clue.

Thanks.
Regard

6 Replies

RK Rathana Kumar Sekar Syncfusion Team June 22, 2017 11:23 AM UTC

Hi Ankush,

Thanks for contacting Syncfusion Support.

We can achieve your requirement "Align the SfCalendar dates in center(Android)" by providing custom view using OnmonthCellLoaded event of SfCalendar. We have attached the sample which we have pass the custom view as label. Please find the sample from the below link.


 
Please let us know if you have any other query.

Regards,
Rathanakumar S.



AN ankush June 22, 2017 01:49 PM UTC

Thanks for this.

Its working for me. But After apply your solution, my "DataSource" appointments are not showing. 

I am bind DataSource in ViewModel.

I am attached images with it after apply your solution and before.



RK Rathana Kumar Sekar Syncfusion Team June 23, 2017 12:23 PM UTC

Hi Ankush,

Thanks for your update.

We have checked the reported issue from our side and custom view of month cell will restrict the inline event indicator view of SfCalendar. So, we have modified the last updated sample to overcome the reported issue. Please find the sample from the below link.

Sample: http://www.syncfusion.com/downloads/support/forum/131113/ze/CalendarCustom-1640508984 

Please let us know if you have any other query.

Regards,
Rathanakumar S. 



AN ankush June 23, 2017 01:35 PM UTC

Hey Rathana Kumar Sekar,

Thanks once again. Its working perfect as i needed.

Regards Ankush.



AN ankush June 23, 2017 01:37 PM UTC

Hey Sorry,

but i have one more question. Is there any way that i know the selected date has contain any appointment or not?

Thanks




RG Rajkumar Ganesamoorthy Syncfusion Team June 26, 2017 12:30 PM UTC

Hi Ankush,

Thanks for your update.

Query: Is there any way that i know the selected date has contain any appointment or not?

In UI we can know a date has appointments or not by using appointment indicator. In code we can get the appointments for a Selected date by filtering the appointments by SelectedDate in selection changed event. We can prepared a sample to show demo on "How to filter the appointments for SelectedDate in SfCalendar".
Please find the sample from below

Sample: http://www.syncfusion.com/downloads/support/forum/131113/ze/CalendarCustom692258016

Regards,
Rajkumar G



Loader.
Up arrow icon