allow 0 as empty-value for date and date-time widgets, as that is used a lot eg. in InfoLog

This commit is contained in:
Ralf Becker 2014-01-30 17:18:05 +00:00
parent 12fc2ba8d0
commit c8603676ef

View File

@ -104,7 +104,9 @@ var et2_date = et2_inputWidget.extend(
set_value: function(_value) {
var old_value = this.getValue();
if(_value === null || _value === "" || _value === undefined)
if(_value === null || _value === "" || _value === undefined ||
// allow 0 as empty-value for date and date-time widgets, as that is used a lot eg. in InfoLog
_value == 0 && (this._type == 'date-time' || this._type == 'date'))
{
_value = null;