jasonhinkle / phreeze

Phreeze Framework for PHP
http://phreeze.com/
GNU Lesser General Public License v2.1
377 stars 207 forks source link

Remove Current Date from Time Picker #263

Open victorhalla opened 7 years ago

victorhalla commented 7 years ago

Hello,

I have a date column where it can be null. The problem is that when adding a new register it always bring me the current date, so if the user did not clean it will save the current date.

I already tried to change the model script to remove this column from new Date() to null or even '' but without success ! Could you help me?

stevetx30 commented 7 years ago

I found it better to clean it up in PHP if null from DB you can set to '0000-00-00' and the picker would not show a date and model. Otherwise you can set in model on save to "0000-00-00" if empty otherwise it might set to '1970-01-01'