Switch all jquery ui date pickers to normal html input on button click

Home Forums Web Development HTML, JavaScript and CSS Switch all jquery ui date pickers to normal html input on button click

Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by  Hirendra Sisodiya 4 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4921

    Shalabh
    Participant

    I have the several date pickers on the my web form. I have one dropdown that contains two options.

    I have to remove the datepicker functionality completely from all input controls on the drop down selection. Have any idea?

    #5068

    Ankur
    Moderator

    If you are using Jquery datepicker then enable/disable will work

    $("#txtDate").datepicker("disable");
    
    $("#txtDate").datepicker("enable");

    Ankur

    #5069

    Ankur
    Moderator

    But In Some case if will disable entire TextBox

    So you can also use

    $(“#txtDate”).datepicker(“destroy”);

    #5070

    If you have several date time pickers then you need to use the class selectors to remove data time picker functionality to all input controls.

    $(".txtDate").datepicker("destroy");

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.