Question

I am trying to make datetime picker readonly. I found the following code in the internet

  $("#RequestedDate").attr('disabled', true)
    .next("span.t-select")
    .children("span.t-icon-calendar").css("visibility", "hidden");

which works great but it reset datetime to minimun datetime.

Était-ce utile?

La solution

You want to set the "readonly" attribute, not "disabled". If it's disabled the value won't be picked up.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top