Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

jcarvalho priority asked 6 days ago


Expected behavior like to clear the selected date

Actual behavior the date is still highlighted in blue

Resources (screenshots, code snippets etc.) selected date in the date table is not resetting.
$('#mydate').val(''');enter image description here


jcarvalho priority commented 6 days ago

Could you please help to reset the highlighted date in Blue. mdb.Datepicker.getInstance(document.getElementById('mydate')).dispose(); mdb.Datepicker.getOrCreateInstance(document.getElementById('mydate')).update({'startDate' : null });

dispose and recreate did not work. Please help.


Kamila Pieńkowska staff answered 5 days ago


Kamila Pieńkowska staff answered 6 days ago


You should change the value in the input and then trigger the 'input' event with JS on the input element.

If it does not help please provide a snippet that recreates the issue. The startDate option does not equal selected date. It is a date that will visible when datepicker opens.


jcarvalho priority commented 6 days ago

Here is the examplelet ele = mdb.Datepicker.getOrCreateInstance(document.getElementById('myDate')); ele.value ='';

$("#myDate").val("").trigger("change");

both did not work.

Can you please provide sample?



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: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.1
  • Device: mac os
  • Browser: google chrome
  • OS: Mac Os
  • Provided sample code: No
  • Provided link: No