SaturnTeam / saturn-datepicker

Angular Material Datepicker with range selection
MIT License
278 stars 110 forks source link

Add Calendar beginDateSelectedChange event to datepicker-input #134

Open varun1233 opened 4 years ago

varun1233 commented 4 years ago

Is it possible to add possible to add beginDateSelectedChange event of saturn-calendar to saturn-datepicker input.

Usecase: It is required when we want to restrict the user selection of end date based on begin date selected. Supposingly the user selected a particular begin date and we want to a validation that then end date can only be selected within 10 days of beginDate. Something like dateLimit. Currently both the event emitter on datepicker input returns event when both start and end date are selected.

abdel-ships-it commented 4 years ago

Possible duplicate of #121

I need this functionality too, I will be trying to implement it over the coming days but cannot promise anything.

varun1233 commented 4 years ago

If you find a solution please mention it here also. I have been looking for it for a couple of days but couldn't find a solution

liamclarkedev commented 4 years ago

I also need this for a similar use case.

Usecase: To be able to stop users from selecting a range of dates overlapping a blocked date. Example: If day 5 was blocked and they selected day 1, they could only select the end date to day 4 and not go all the way to 6 and 7. Having a beginDateSelected will allow me to update the filter to disable those dates.

Snesi commented 3 years ago

Hey @varun1233 I see that this feature is now available in the code. Are you planning on publishing it to npm anytime soon?