jQuery UI Datepicker Add Days

后端 未结 3 1568
[愿得一人]
[愿得一人] 2021-01-06 13:42

I\'m attempting to create something of range system for booking rooms on a hotel website and I\'m using jQuery UI Datepicker to allow the user to select their check in date.

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-06 13:54

    Use the setDate function.

    setDate

    Signature: .datepicker( "setDate" , date )

    Sets the current date for the datepicker. The new date may be a Date object or a string in the current date format (e.g. '01/26/2009'), a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null to clear the selected date.

提交回复
热议问题