Topic: Date Picker: set default date using JS

caliph007 pro asked 6 years ago


I am using the jQuery version and want to set a default date when initializing the datepicker. How can I do this?  

Mikołaj Smoleński staff answered 6 years ago


You can set the default date value by adding value atrribute to input: For example:
<input placeholder="Selected date" type="text" id="date-picker-example" value="12 January, 2018" class="form-control datepicker">
Regards

caliph007 pro commented 6 years ago

ok. Ist this here not possible? http://amsul.ca/pickadate.js/api/#method-set-select

Mikołaj Smoleński staff commented 6 years ago

You can try, but adding value attribute is faster and have the same effect


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags