Jquery Date picker Default Date

后端 未结 6 2131
忘了有多久
忘了有多久 2020-12-01 13:37

I am using a Jquery Datepicker in my project. The problem is that it is not loading the current date, but showing a date 1st January 2001 as default. Can you please let me k

6条回答
  •  粉色の甜心
    2020-12-01 14:30

    Are u using this datepicker http://jqueryui.com/demos/datepicker/ ? if yes there are options to set the default Date.If you didn't change anything , by default it will show the current date.

    any way this will gives current date

    $( ".selector" ).datepicker({ defaultDate: new Date() });
    

提交回复
热议问题