Topic: Datepicker - Select input Month and year

mdw free asked 4 years ago

Expected behavior

Is it possible to add selectinput for year and month with the new datepicker version ? When i use $('.datepicker').pickadate(); it works but with the new update $('.datepicker').datepicker({}) it doesn't.

Is it possible to open directly datepicker on input focus with the new version ?

Actual behavior

Actually the new version is not intuitive. For example it's difficult to enter a birthdate without select year input.

Resources (screenshots, code snippets etc.)

    formatSubmit: 'yyyy-mm-dd',
    format: 'dd/mm/yyyy',
    selectMonths: true,
    selectYears: 100

Grzegorz Bujański staff commented 4 years ago

Hi. New datepicker opens only after click the icon. It is not possible to change this behavior and it is not possible to add a separate selectinput for the year and month

lemons free commented 4 years ago

Hi, please check my updated snippet: I added the ::hover color in css permanently to make it more clear where to change the year. You could do the same for the left & right arrows/chevrons...

@edit: I also added a very simple solution for opening the calendar from clicking the input instead of the icon :)

Grzegorz Bujański staff commented 4 years ago

Hi. I can't open this snippet. I thing you create private snippet and i can't open it.

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 jQuery
  • MDB Version: 4.18.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No