Saturday 15 June 2013

javascript - enable/disable datepicker with dropdown asp.net -


I have a dropdown to select data type data in the text box. I dropdown option, like integer, decimal, string, date Are there.

Everything is working fine except for a thing which is selected on the date of the dropdown when a date picture can not be found in the text box.

tried something but failed to get it

  $ (function () {$ (". Date1") datepicker ({changeMonth: true, changeYear : True, numberOfMonths: 1});}); $ ("# & Lt;% = ddlDataType.ClientID%>") Change (function (if ($ ('# & lt;% = ddlDataType.ClientID% & gt; option: selected'). Text (). ToLowerCase ("class", "date1");} and {$ ("#", "#", "Date") {$ ("# & lt;% = txtDefaultValue.ClientID%> ClientID%> & gt;") .pr ("Square   

If you want to delete it (enable it for another purpose), then you can use the method

  $ ("# & lt; % = TxtDefaultValue.ClientID%> ") datepicker (" deleted ");  

Other

You can set options to enable and disable, ddlDataType change on the event of the drowndown list.

  $ ("# & lt;% = txtDefaultValue.ClientID%>.") Datepicker ( $ '($'); $ (Date: $ ''); Datepicker ('disabled');  

Optional You get $ ($ #) You can also set options to disable $ datelink to enable ("# & lt;% = txtDefaultValue.ClientID%>") .Detaptor ("Option", "Disabled", Incorrect); // $ ("# & lt;% = txtDefaultValue.ClientID%>") to disable. Datepicker ("option", "disabled", true);


No comments:

Post a Comment