simplepicker
simplepicker copied to clipboard
Make Previous dates disabled
There should be a flag to disable the selection of previous dates.
For example, if today is 03 Nov 2018 then one should not be able to select the date previous than 3rd Nov.
thanks.
Agreed, I will work on it @adrshk!
Unfortunately, I don't have time to work on this currently! I can start working on it this weekend (This is on my todolist).
(@adrshk this should be hard to implement, so if you could work on it and create a PR I can merge and create a new release.)
Can you suggest where in the code would be a good place to add support for enabling a selected range of dates? For example, other date-picker libraries allow configuring either a start date or end date or both. I scanned index.ts but didn't spot an obvious place to insert enforcement of such config.
(Similarly, is there a way to configure a default time? And where can one provide localized strings for month names?)
@David-dp- The render
method in the index.ts
is the main place where rendering happens. But, for what you are trying to do, you need to update the scrape
methods in date-util.ts
to support ranges. If you want to work on providing an API for month names date-util.ts
is also the place.
For passing the default time, the selectedDate
option should work.