JQuery place holder text не работает в браузерах firefox и IE
Below is my code for placing the place holder text in textbox as mm/dd/yyyy it is working in chrome browser but the place holder text and the date picker which is working in chrome is not supporting in firefox and Internet Explorer <script> $('input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"]').each(function () { var el = this, type = $(el).attr('type'); if ($(el).val() == '') $(el).attr('type', 'text'); $(el).focus(function () { $(el).attr('type', type); el.click(); }); $(el).blur(function () { if ($(el).val() == '') $(el).attr('type', 'text'); }); }); </script> <asp:TextBox ID="txtFromDate" Width="113px" runat="server" type="date" placeholder="Date">
Что я уже пробовал:
My requirement is to have a place holder text as mm/dd/yyyy in textbox and while typing month mm should disapper and while typing date dd should disappear similarly for yyyy how can i do this