function disableDate() { debugger; document.getElementById('txtStartDate').disabled = true; $get('txtStartDate').style.color = "gray"; $get('txtStartDate').disabled = true; $('txtStartDate').datepicker('disable'); $('txtStartDate').datepicker('setDate', new Date()).datepicker('disable').blur(); $('txtStartDate').disableSelection = true; }
<input id="txtStartDate" runat="server" class="TextBox DatePicker" style="width: 125px" />
<style> .ui-datepicker-trigger { position: relative; top: 4px; right: -3px; height: 17px; } </style> <script language="javascript" type="text/javascript"> var Dformat = ""; $(document).ready(function () { var selectvalStartDate = $("#txtStartDate").val(); var sVal = document.getElementById('hdnPORTALID').value; Dformat = GetDatePickerFormat(sVal); $(".DatePicker").attr("placeholder", "Select date").datepicker({ showOn: "both", buttonImage: "../images/datepicker_enable.png", buttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: Dformat }); }); </script>
$( "#from" ).datepicker( "option", "disabled", true );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)