Cannot set Calendar startdate
See original GitHub issueI have tried setting the calendar startday both in XAML and also in code behind.
I have even tried placing it in 3 different areas:
in XAML that didn’t work:
<controls:Calendar StartDate="{Binding Date}" EnableTitleMonthYearView="true" x:Name="calendar" Padding="10,0,10,0" StartDay="Monday" SelectedBorderWidth="4" DisabledBorderColor="Black">
</controls:Calendar>
So I tried adding it from c# code:
calendar = new XamForms.Controls.Calendar
{
BorderColor = Color.Gray,
BorderWidth = 3,
BackgroundColor = Color.White,
StartDay = DayOfWeek.Monday,
StartDate = DateTime.Now.AddDays(1)
};
and even using the method and field:
calendar.StartDate = Date;
calendar.CalendarStartDate(Date);
None of them worked 😦
Am I missing something? I even tried redrawing it forcefully but still, it didn’t start the calendar from my designated date. I read I might need to add something to my AssemblyInfo.cs:
[assembly:Xamarin.Forms.Platform.<Platform>.ExportRenderer(typeof(XamForms.Controls.CalendarButton),typeof(XamForms.Controls.<Platform>.CalendarButtonRenderer))]
But, when I type this bit:
[assembly:Xamarin.Forms.Platform.
it does not even include iOS and Droid let alone ExportRenderer
What am I doing wrong here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
End date occurs before start date
Whenever I click "OK" on the Outlook Options window, I get the message "The end date you entered occurs before the start date....
Read more >unable to set calendar start date in pikaday calendar
When i trigger the start date input box, I want to show the future or past month in calendar popup as a starting...
Read more >How I can fix error "No start date has been set"?
The problem is that you wrap setting the properties of the EKEvent in a dispatch async block, while you save the even outside...
Read more >Unable to make changes to an existing Calendar entry
I have this Calendar entry with a reminder. Regretfully I can't change anything to it, like setting Reminder: 0 hours.
Read more >Altering due date in Microsoft To-Do > Change event start ...
I have set up the predefined zap “Create Microsoft To-Do tasks for new or updated Google Calendar events”. This is great because it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thnx ali-h2010 itz working fine,
calendar.StartDate=DateTime.Today;
@amirvenus please update us on this issue and close it if done