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:
Denis Flaven
2012-03-21 10:58:43 +00:00
parent 94b6730697
commit c96952a369
2 changed files with 12 additions and 1 deletions

View File

@@ -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\"/>&nbsp;{$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\"/>&nbsp;{$sValidationField}";
break;
case 'Duration':
@@ -1735,6 +1736,7 @@ EOF
$aStyles = array();
$sStyle = '';
$sWidth = $oAttDef->GetWidth('width', '');
if (!empty($sWidth))
{
$aStyles[] = 'width:'.$sWidth;

View File

@@ -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()
{