mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 04:31:06 +01:00
Backport commit r48260, committed by Nathan Gray. Even more date fixes:
- Don't send a date (just 1970-01-01) with timeonly values - Avoid infinite loop when setting timeonly with timepicker
This commit is contained in:
parent
0f83b2be95
commit
739d2406bc
@ -74,6 +74,10 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
|||||||
{
|
{
|
||||||
$date = new egw_time((int)$value, new DateTimeZone('UTC'));
|
$date = new egw_time((int)$value, new DateTimeZone('UTC'));
|
||||||
}
|
}
|
||||||
|
if($this->type == 'date-timeonly')
|
||||||
|
{
|
||||||
|
$date->setDate(1970, 1, 1);
|
||||||
|
}
|
||||||
if($date)
|
if($date)
|
||||||
{
|
{
|
||||||
// Set timezone to UTC so javascript doesn't add/subtract anything
|
// Set timezone to UTC so javascript doesn't add/subtract anything
|
||||||
|
@ -157,9 +157,9 @@ var et2_date = et2_inputWidget.extend(
|
|||||||
// Avoid javascript timezone offset, hour is in 'user time'
|
// Avoid javascript timezone offset, hour is in 'user time'
|
||||||
this.date.setUTCHours(parsed.hour);
|
this.date.setUTCHours(parsed.hour);
|
||||||
this.date.setMinutes(parsed.minute);
|
this.date.setMinutes(parsed.minute);
|
||||||
this.input_date.val(_value);
|
if(this.input_date.val() != _value)
|
||||||
if(old_value !== this.getValue())
|
|
||||||
{
|
{
|
||||||
|
this.input_date.val(_value);
|
||||||
this.input_date.timepicker('setTime',_value);
|
this.input_date.timepicker('setTime',_value);
|
||||||
if (this._oldValue !== et2_no_init)
|
if (this._oldValue !== et2_no_init)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user