jQuery-UI datepicker default date

后端 未结 7 1401
盖世英雄少女心
盖世英雄少女心 2020-11-29 03:34

I have a problem with the jQuery-UI datepicker, I have searched and searched but I didn\'t find the answer. I have the following code:



        
7条回答
  •  爱一瞬间的悲伤
    2020-11-29 04:33

    Try passing in a Date object instead. I can't see why it doesn't work in the format you have entered:

    
    

    http://api.jqueryui.com/datepicker/#option-defaultDate

    Specify either an actual date via a Date object or as a string in the current dateFormat, or 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 for today.

提交回复
热议问题