bootstrap datepicker today as default

前端 未结 12 2210
粉色の甜心
粉色の甜心 2020-12-24 04:32

I am using this bootstrap-datepicker for my datepicker. I\'d like the datepicker to choose \"today\" for start day or default day. I cannot figure out how to set \"today\"

12条回答
  •  情歌与酒
    2020-12-24 05:04

    For bootstrap date picker

    $( ".classNmae" ).datepicker( "setDate", new Date());
    

    * new Date is jquery default function in which you can pass custom date & if it not set, it will take current date by default

提交回复
热议问题