mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
260 stars 182 forks source link

Add option to disable prefill with current date and time #63

Closed Mondane closed 10 years ago

Mondane commented 11 years ago

I have a situation where I don't want my datetime fields prefilled with the current date and time. Can you add an option to disable this feature?

rakela commented 11 years ago

I have the same situation. I made 'false' the value in line 760 at jquery.simple-dtpicker.js: "isOutputToInputObject": false;

hanneskaeufler commented 11 years ago

+1

aconway commented 11 years ago

I added a new boolean option "prefill" that is passed as an option to draw_date() in init(). In outputToInputObject() I added a second argument "fill" that is passed as true if the "prefill" option is undefined. If "fill" is false return immediately out of outputToInputObject(). The "prefill" option is only passed by init(), it doesn't need to be stored in $picker.data().

norcross commented 10 years ago

not sure if this was an option when you all set this up, but setting 'autodateOnStart' to false will prevent autofill

Mondane commented 10 years ago

It wasn't in version 1.7.0, but is in 1.9.0, ticket closed :).