Closed khadishi closed 3 years ago
@smkhadishi please describe your purpose. I don't see a reason for that it has consequences. By adding preSelectedEnd more validations are required as always should take care of preSelectedStart and end in a way that end stays at the same time or after start.
1- For restart purposes you just need to set preSelectedStart and by updating that both start and end will be reset to the value.
2- If you want to handle values out from outside, that's OK. Again, handle preSelectedStart from your parent component and when you update it from out side it will update both start and end.
The logic says that by updating start date, end should be updated too.
If you have another approach, share it to see if adding it is valuable or not.
Thanks
please add preSelectedEnd to DateRangePicker Component
https://github.com/A-Kasaaian/react-advance-jalaali-datepicker/blob/master/src/DateRangePicker.js Line 69: preSelected={preSelectedStart} => preSelected={preSelectedEnd}