calendar - How do I get one jquery datepicker input to integrate with value of another? -


I have a form with 3 input fields, which use the jQuery DatePicker plugin. The fields are #startdate, #enddate, and #raindate. I'm using DatePicker's Event Function to work together #startdate and #enddate, so #enddate can not be preceded by #startdate. Those two areas are needed, by the way. #Reded field is not required, however, if the user wants to add a date here, then I want it to happen after the selected date in #endend. How do I do this? To get the initial date and closing, I have the code to work together:

function getDates () {var date = $ ("#startdate, #enddate") .datepicker ( {DefaultDate: "+ 1d", changeable: true, numberofmonth: 1, on selection: function (selected) {var option = this.id == "start" "min": "maxDate", example = $ (this). Data ("Datepicker"); date = $ .datepicker.parseDate (instance.settings.dateFormat || $ .datepicker._defaults.dateFormat, selectedDate, instance.settings); dates.not (this) .datepicker ("Options", Option, date);}})}}

specify something like this Is there any way to kill?:

  minDate: $ (# enddate) .val () + 1d  

Yes an option is called minDate and it also supports a lot of options.

To get all available options -

Go to the Options tab.

The above code can be obtained by following -

  $ ('# raindate') . Datepicker ({dateFormat: "dd m yy", first show: custom range, // your other configuration.}); Function custombank (input) {if (input.id == "raindate") {dateMin = new date (); If ($ ("# enddate") datepicker ("getDate") = null) {dateMin = $ ("# enddate"). Datepicker ("getDate"); DateMin.setDate (dateMin.getDate (+ 1); }} Return {minute date: datein}; }  

Comments