mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
The date picker fills the "time" part of the field with 00:00:00 when picking a DateTime instead of just a Date.
SVN:trunk[1911]
This commit is contained in:
@@ -1354,6 +1354,7 @@ EOF
|
||||
{
|
||||
$oObj = $aObjects[$sAlias];
|
||||
foreach($aList[$sAlias] as $sAttCode => $oAttDef)
|
||||
|
||||
{
|
||||
if (is_null($oObj))
|
||||
{
|
||||
@@ -1699,7 +1700,7 @@ EOF
|
||||
$aEventsList[] ='validate';
|
||||
$aEventsList[] ='keyup';
|
||||
$aEventsList[] ='change';
|
||||
$sHTMLValue = "<input title=\"$sHelpText\" class=\"date-pick\" type=\"text\" size=\"20\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" value=\"".htmlentities($sDisplayValue, ENT_QUOTES, 'UTF-8')."\" id=\"$iId\"/> {$sValidationField}";
|
||||
$sHTMLValue = "<input title=\"$sHelpText\" class=\"datetime-pick\" type=\"text\" size=\"20\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" value=\"".htmlentities($sDisplayValue, ENT_QUOTES, 'UTF-8')."\" id=\"$iId\"/> {$sValidationField}";
|
||||
break;
|
||||
|
||||
case 'Duration':
|
||||
@@ -1735,6 +1736,7 @@ EOF
|
||||
$aStyles = array();
|
||||
$sStyle = '';
|
||||
$sWidth = $oAttDef->GetWidth('width', '');
|
||||
|
||||
if (!empty($sWidth))
|
||||
{
|
||||
$aStyles[] = 'width:'.$sWidth;
|
||||
|
||||
@@ -317,6 +317,15 @@ EOF
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
$(".datetime-pick").datepicker({
|
||||
showOn: 'button',
|
||||
buttonImage: '../images/calendar.png',
|
||||
buttonImageOnly: true,
|
||||
dateFormat: 'yy-mm-dd 00:00:00',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
// Restore the persisted sortable order, for all sortable lists... if any
|
||||
$('.sortable').each(function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user