trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

jQuery Datepicker Insert NULL if Left Blank #888

Open naskobulgaria opened 8 years ago

naskobulgaria commented 8 years ago

I'm using jQuery UI Datepicker. When the page is submitted, if no value is entered, I need to insert NULL into the SQL table. Instead it is currently inserting 1900-01-01 00:00:00.000. Is it possible to pass NULL in my insert using jQuery UI Datepicker?

In the SQL table, which was created years ago, the Data Type is datetime and Allow Nulls is set to Yes. Nothing is set in Default Value or Binding.

I tryed this code: $('#sDatepicker, #eDatepicker').datepicker({ changeMonth: true, changeYear: true, dateFormat: "mm/dd/yyyy" defaultDate:"01/01/1900" //some date }); But cant see the default date in my input field.