How display only years in input Bootstrap Datepicker?

后端 未结 6 1162
谎友^
谎友^ 2021-01-30 21:06

I am using the following code to display only the years:

$(\"#datepicker\").datepicker( {viewMode: \"years\", minViewMode: \"years\"});

but inp

6条回答
  •  渐次进展
    2021-01-30 21:28

    For bootstrap 3 datepicker. (Note the capital letters)

    $("#datetimepicker").datetimepicker( {
      format: "YYYY",
      viewMode: "years"
    });
    

提交回复
热议问题