If you want to date field value into custom java script. You can use this script. $(document).ready(function(){ var CurrentDate = new Date(); var stdregistrationclosedatetime = $("#stdregistrationclosedatetime").datepicker({ dateFormat: 'dd,MM,yyyy' }).val(); var registrationclosedatetime = new Date(stdregistrationclosedatetime) if(CurrentDate>registrationclosedatetime){ $("#UpdateButton").hide(); } });
Work smarter, not harder.