Topic: [Help] DatePicker override button values with jQuery & JS

joel.jdesignera pro asked 5 years ago


Is there any way to intercept or override the date picker buttons value? Example, if I users were to click on today, it will override the value being set to maybe Today, instead of the date format of today. I tried this and it isn't working as I thought it will:

    // Overrides Date Picker Today Button default value
    $('#profile #experience.section  button.picker__button--today').click(function(e) {
        e.preventDefault();
        $('#profile #experience.section input[type="hidden"][name="exp-end"]').val('Present');
    });

joel.jdesignera pro answered 5 years ago


The datepicker has a today button, that sets the value to today date. But instead of having the button to set the value to today's date. I would like it to set to a custom value that isn't a date. Example a text.

Magdalena Obalska free answered 5 years ago


Hi, could you explain more precisely what do you expect to achieve?

joel.jdesignera pro answered 5 years ago


I am on MDB Pro 4.3.2 anyways.

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags