How to set Datetimepicker 's container option.


Topic: How to set Datetimepicker 's container option.

salas ljs pro premium priority asked 2 years ago

Expected behavior When open the datetimepicker ,I want to show the select panel in a nav element. Actual behavior But do not valid. Resources (screenshots, code snippets etc.) // html

// js code const options = { datepicker: {format: 'yyyy-mm-dd'}, container:'nav', } const myDatetimepicker = new mdb.Datetimepicker(document.getElementById('myDatetimepicker'), options);


mlazaru staff answered 2 years ago

Is that what you are looking for? https://mdbootstrap.com/snippets/standard/mlazaru/4818409#html-tab-view

You need to use container option to choose the element where the Datetimepicker will be rendered. In this case, Datetimepicker will look the same because of the fixed position.

That's why in the snippet above, I've used the inline version of the Datetimepicker.


salas ljs pro premium priority answered 2 years ago

const options = { datepicker: {format: 'yyyy-mm-dd'}, container:'nav', // how to set ??? } ;

const myDatetimepicker = new mdb.Datetimepicker(document.getElementById('myDatetimepicker'), options);


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.1.0
  • Device: pc
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No