fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15913] more on datetimepicker


From: sigurdne
Subject: [Fmsystem-commits] [15913] more on datetimepicker
Date: Sun, 30 Oct 2016 14:09:29 +0000 (UTC)

Revision: 15913
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15913
Author:   sigurdne
Date:     2016-10-30 14:09:28 +0000 (Sun, 30 Oct 2016)
Log Message:
-----------
more on datetimepicker

Modified Paths:
--------------
    trunk/booking/inc/class.uicommon.inc.php
    trunk/phpgwapi/inc/class.jqcal2.inc.php

Modified: trunk/booking/inc/class.uicommon.inc.php
===================================================================
--- trunk/booking/inc/class.uicommon.inc.php    2016-10-30 14:08:38 UTC (rev 
15912)
+++ trunk/booking/inc/class.uicommon.inc.php    2016-10-30 14:09:28 UTC (rev 
15913)
@@ -870,15 +870,17 @@
                        $lang_to = lang('to');
                        $lang_remove = lang('remove date');
 
+                       $placeholder = str_ireplace(array('Y','m', 'd', 'H', 
'i'), array('YYYY', 'MM', 'DD', 'HH', 'mm' ),$dateformat);
+
                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
                        {
                                $html = 'var html = "<div 
class=\'date-container\'>"+
                             "<a class=\'close-btn btnclose\' 
href=\'javascript:void(0);\'>' . $lang_remove . '</a>"+
                             "<dt><label 
for=\'new_start_date_"+this.counter+"\'>' . $lang_from . '</label></dt>"+
-                            "<dd><input class=\'new_datepicker time\'  
name=\'from_[]\' id=\'new_start_date_"+this.counter+"\' type=\'text\'>"+
+                            "<dd><input class=\'new_datepicker time\'  
name=\'from_[]\' id=\'new_start_date_"+this.counter+"\' type=\'text\' 
placeholder =\'' . $placeholder . '\'>"+
                             "</input></dd>"+
                             "<dt><label for=\'new_end_date_"+this.counter+"\' 
>' . $lang_to . '</label></dt>"+
-                            "<dd><input class=\'new_datepicker time\'  
name=\'to_[]\' id=\'new_end_date_"+this.counter+"\' type=\'text\'>"+
+                            "<dd><input class=\'new_datepicker time\'  
name=\'to_[]\' id=\'new_end_date_"+this.counter+"\' type=\'text\' placeholder 
=\'' . $placeholder . '\'>"+
                             "</input></dd>"+
                         "</div>"';
                        }
@@ -888,12 +890,12 @@
                                                "<a class=\'close-btn 
btnclose\' href=\'javascript:void(0);\'>-</a>"+
                                                "<div 
class=\'pure-control-group\'>"+
                                                        "<label 
for=\'new_start_date_"+this.counter+"\'><h4>' . $lang_from . '</h4></label>"+
-                                                       "<input 
class=\'new_datepicker time pure-input-2-3\'  name=\'from_[]\' 
id=\'new_start_date_"+this.counter+"\' type=\'text\'>"+
+                                                       "<input 
class=\'new_datepicker time pure-input-2-3\'  name=\'from_[]\' 
id=\'new_start_date_"+this.counter+"\' type=\'text\' placeholder =\'' . 
$placeholder . '\'>"+
                                                        "</input>"+
                                                "</div>"+
                                                "<div 
class=\'pure-control-group\'>"+
                                                        "<label 
for=\'new_end_date_"+this.counter+"\' ><h4>' . $lang_to . '</h4></label>"+
-                                                       "<input 
class=\'new_datepicker time pure-input-2-3\'  name=\'to_[]\' 
id=\'new_end_date_"+this.counter+"\' type=\'text\'>"+
+                                                       "<input 
class=\'new_datepicker time pure-input-2-3\'  name=\'to_[]\' 
id=\'new_end_date_"+this.counter+"\' type=\'text\' placeholder =\'' . 
$placeholder . '\'>"+
                                                        "</input>"+
                                                "</div>"+
                                        "</div>"';

Modified: trunk/phpgwapi/inc/class.jqcal2.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.jqcal2.inc.php     2016-10-30 14:08:38 UTC (rev 
15912)
+++ trunk/phpgwapi/inc/class.jqcal2.inc.php     2016-10-30 14:09:28 UTC (rev 
15913)
@@ -74,10 +74,13 @@
                {
                        $datepicker = $type == 'time' ? 0 : 1;
                        $timepicker = $type == 'date' ? 0 : 1;
+                       $placeholder = str_ireplace(array('Y','m', 'd', 'H', 
'i'), array('YYYY', 'MM', 'DD', 'HH', 'mm' ),$dateformat);
+
                        $js = <<<JS
                        $(document).ready(function()
                        {
                                $( "#{$id}" ).attr('readonly', false);
+                               $( "#{$id}" ).attr('placeholder', 
'{$placeholder}');
 
                                
jQuery.datetimepicker.setLocale('{$this->userlang}');
                                $( "#{$id}" ).datetimepicker(




reply via email to

[Prev in Thread] Current Thread [Next in Thread]