Closed soyef-bit closed 3 years ago
@ekhaled changed min & max type to string, it effective now, And it should be a usage issue in storybook, not making any issues on real life
@soyef-bit you can pull master and can check min & max dates
@sunnypol92 Checked.
I am able to work with enable_dates
.
Noticed that if 2 dates are put into the array, it enables these 2 dates only. Not all the dates in between. Is that by design?
I am still unable to work with disable_dates
.
Putting more than one date in the array results in disabling only the last date in the array
Actually this working the same way as enable_dates
, i.e not a range of dates, but the selected dates only get disabled.
Bug
enable_dates
disable_dates
in property. datepicker still keeps the enabled or disabled dates but this is not reflected in the properties table.Did not check the min_date
max_date
functionality as they are storybook issues as mentioned above.
Now that min_date
max_date
are string
only, shall i change the docs to reflect that. Not doing it since it is the master branch.
verified and spoke to @sunnypol92 . everything is working fine and the issue in the last comment is to do with storybook.
may be the doc
Enables a range of dates and disables all others
is misleading and should be something along the lines of
Enables a list of dates and disables all others
, and the same with disable_dates
There is documentation at the bottom of the page on various usage of enable_dates
and disable_dates
.
You can send a specific date, or a range of dates using from
and to
parameters.
You can also send a function to dynamically work out whether to disable a specifc date or not.
Please close after verification of this
Done
min_date
andmax_date
properties within the story, and couldn’t get any functionality. It could be that my usage is wrong. I tried entering dates in these formats:'2021-06-06'
,2021-06-06
and{(new Date('2021-01-01'))}
in the input box next to the property. I tried setting a minimum date and a maximum date and nothing happened.disable_dates
also didn’t work for me, and instead it disabled most of the calendar when I tried to disable 2 days only. Can’t be sure if my usage is wrong because I gotenable_dates
to work how I like