Is there any pythonic (non-javascript) way to work with hour/minutes drop-downs when pick_time is set to True? At the moment we can programmatically tell the calendar to restrict/enable dates from/to (see my project screen-shot)
, but how about hour and minute selectors?
For instance, you want a visit scheduler/calendar and your office hours start at 08:00, so the drop-down shows hours from 0800 to whatever (e.g 1700).
Or another one, you expose a calendar to your clients that can select visit time with minutes drop-down giving them 15,30,45 minutes optionsā¦
Regards,
Archie
Edit to clarify my post:
when my pick_time is set to True , I can see both drop-downs for hours and minutes. What I am after is ability to display e.g 8-17 , insted of 1-23 in hours drop-down
Thereās no built-in way to do that with the DatePicker component. If you use a DatePicker with pick_time set to False and add two extra DropDowns for hours and minutes, you could restrict the contents of the DropDowns that way.
Beside to the point mentioned by Archie, they are some other āflawsā regarding localization. In some countries the week starts on Monday. Following the daterangepicker documentation, the ālocaleā object can be used for international settings. Guess, your international anvil user/developer would be thankfulā¦
Unfortunately no, but I guess it has to be changed by the anvil guys because the change I suspect is around the components/DatePicker.js. A additional property is required to set the local setting: āfirstDayā: 1.
Found this information here: http://www.daterangepicker.com/#config. Enable the ālocaleā option to see changes.
@shaun, @meredydd: are my assumptions correct? Possible to implement the request?
@shaun if you guys are considering modifying the date picker, having an option to reduce the minutes to 15 minute blocks as @k4projekt suggests would be great
Thanks for letting us know. Do you know perhaps how to get the date from the datepicker to combine with a dropdown selected time value ? So itās a datetime object to inject in the database?