开发者

How to set a Jquery Datepicker daterange

I have two input text boxes which is bound to 开发者_Go百科jquery Datepicker widget. When user select a given date from Date1 (Effective Date), I want to set the min date of Date2 (Expiry date) to Date1 + 1 .. How do I do that, Thanks


see this link : jQuery datepicker- 2 inputs/textboxes and restricting range

and use onChangeMonthYear function or onSelect function:

$('#txtStartDate, #txtEndDate').datepicker({
        showOn: "both",
        beforeShow: customRange,
        dateFormat: "dd M yy",
        firstDay: 1, 
        changeFirstDay: false,
        onChangeMonthYear: function(year, month, inst) { ... },
        onSelect: function(dateText, inst) { ... }
    });

and use the same technique Ben Koehler or Russ Cam used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜