Topic: datepicker submits form when changing months

Bonanos pro asked 4 years ago


Expected behavior

I've set properties on a datepicker to specify a min and max date (set in variables elsewhere in code). When using the month navigation arrows and trying to navigate passed the allowable date the form gets automatically submitted? I have a number of datepickers on the form and in each case this occurs. When there is no min or max properties set on the datepickers then everything works fine.

$('#DteOpened').pickadate({ min: new Date(minDt), max: new Date(dt), selectYears: 2, format: 'dd/mm/yyyy' })

I've tried to recreate this in a snippet but there doesn't seem to be any monthly navigation arrows on the datepicker, even when using navPrev: 'picker_nav--prev', navNext: 'picker_nav--next',

to try and set them.

Am I doing something wrong here?

Cheers Shaun


Bonanos pro answered 4 years ago


Just installed latest version and I see that the Month navigation arrows are gone, is there some kind of correlation between the submit problem and these being removed?

Many thanks Shaun


Grzegorz Bujański staff commented 4 years ago

Hi. We didn't change anything in the date picker since version 4.10.0. Show me your snippet. I will look at this.


Bonanos pro commented 4 years ago

I'm actually unable to recreate this now that I've updated the version because I can't get the months navigation (left and right) to show? It seemed like it was on by default but now it doesn't show?


Grzegorz Bujański staff commented 4 years ago

I checked this. Bug on our side. We will fix it soon.



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: 4.12.0
  • Device: laptop
  • Browser: chrome
  • OS: windows 8
  • Provided sample code: No
  • Provided link: No