03-24-2020 00:37 AM - last edited 12-17-2021 14:45 PM
After I shared my previous revamped date picker control, one of the comments was to further improve the component by providing the ability to control the first day of the week, as it is Sunday for the US and Monday for Europe.
I started off with some super complex changes to my simple component but as it turns out often, the change needed was a very simple one. The Weekday function assumes Sunday as the first day of the week, even if you don't specify it explicitly. So I had to explicitly define the first day of the week in all Weekday functions using StartOfWeek enumeration based on a toggle value. As with the v1 of the component, the changes will become clearer when you explore the component.
Here is how the control behaves now:
So keep your suggestions coming and I will try to incorporate them!
Thanks,
Hardit Bhatia