How to focus a particular date in datepicker??

How to focus a particular date in datepicker??

Comments

  • edited January 22

    You can use setValueHere():

    //Get new date, dateonly, because I am not using timepicker
    var strNew = dtNew.toISOString().split('T')[0];
    $$('picker-correction-date').setValueHere(strNew);
    $$('picker-correction-date').focus();
    // Show the datepicker's selection
    webix.html.triggerEvent($$("picker-correction-date").getInputNode(), "MouseEvents", "click");

    This code block sets the date of my "Correction date" datepicker field, then sets focus for the user to see the selection and/or change it if they want.

    I have modified one of the standard datepicker snippets to illustrate how this works.

  • Thanks for your time to reply. Here should focus a date but I should not select that.

  • Here requirement is I have some past dates which I need to focus but I should not select

  • @mvbaxter Here requirement is I have some past dates which I need to focus but I should not select

  • edited February 1
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!