Closed pwnz22 closed 5 years ago
You can already do that using the minDate
and maxDate
options. Did you try using those values?
Yes, i tried, but didnt get what i need. I dont know which values to set to allow user to pick any dates between any month of one year. For example i can pick: 01.05.2018 - 20.05.2018 but not 01.05.2018 - 20.06.2018.
Can you explain how to use that options.
How about setting minDate: '2018-05-01'
& maxDate: '2018-05-20'
?
Look user can choose any day from one month and any year. I have restriction of picking between one month. Examples of user can pick:
2017-05-01 - 2017-05-30 2018-01-20 - 2018-01-25 But not:
2017-05-01 - 2017-06-05 2018-02-20 - 2018-03-25
etc...
oh! okay. Now I got it. So you want to allow the duration to be max a month doesn't matter which month it is.
Currently, there's no way to do this. I'll have to think about the API a little and get back to you with a solution soon.
You can use computed props to change maxDate prop.
something like
minDate = firstPickedDate; maxDate = minDate + 30days
I have looked into this but it seems like @mariokresic 's way is the most convenient way of doing this right now. Anything else I tried required change to the actual datepicker component which is not possible from this component.
Hello guys!
Please help to set options for my needs.
I want to allow to user to pick dates in range of one month of any year. Thanks.