longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

startDate to be past another individual input #465

Closed ghost closed 5 years ago

ghost commented 5 years ago

Two seperate date pickers. Once has a date going from today as: startDate: moment().endOf('day').format('DD-MMMM-YYYY'),

The second needs to be always on that day or after... Ive been looking into this for ages and i literally cannot work out what the hell im doing.

monovertex commented 5 years ago

Hi @vedaleondesign! Please see this JSFiddle (which was included in my answer here). You can use beforeShowDay to disable all the dates before a specific date, and this is a dynamic process, since beforeShowDay is executed every time before the calendar is rendered.

I'm closing the issue since I consider the question answered, but please continue the discussion here if you feel like the answer is not solving your issue.