Topic: Datepicker startdate not working

joelgrondrup free asked 3 years ago

startDay in Datepicker is not working

const options = { format: 'dd-mm-yyyy', startDay: 1}
const myDatepicker = new mdb.Datepicker(document.getElementById('myDatepicker'), options)

Should start with Monday. But still Sunday is first.

Grzegorz Bujański staff commented 3 years ago

look at @Andrew Ford answer. You try get element by id, but you didn't add an id to the element.

Andrew Ford priority answered 3 years ago


<div class="form-outline" id="myDatepicker">
  <input type="text" class="form-control" id="exampleDatepicker1" />
  <label for="exampleDatepicker1" class="form-label">Select a date</label>


const options = {
  format: 'dd-mm-yyyy',
  startDay: 1
const myDatepicker = new mdb.Datepicker(document.getElementById('myDatepicker'), options);

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 2.0.0
  • Device: Mac
  • Browser: Chrome/Safari
  • OS: 10.15.7 Catalina
  • Provided sample code: No
  • Provided link: Yes