Skip to content
Snippets Groups Projects
Commit 2bf2998e authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'develop' into 'S13788_datetimepicker_selectable_weekdays'

# Conflicts:
#   javascript/src/Main.js
parents ff4bef1e 4ef64841
No related branches found
No related tags found
Loading
Checking pipeline status
...@@ -1289,7 +1289,9 @@ Type: date ...@@ -1289,7 +1289,9 @@ Type: date
* Range datetime: '1000-01-01' to '9999-12-31' or '0000-00-00'. (http://dev.mysql.com/doc/refman/5.5/en/datetime.html) * Range datetime: '1000-01-01' to '9999-12-31' or '0000-00-00'. (http://dev.mysql.com/doc/refman/5.5/en/datetime.html)
* Optional: * Optional:
* *FormElement.parameter.dateFormat*: yyyy-mm-dd | dd.mm.yyyy * *FormElement.parameter.dateFormat*: YYYY-MM-DD | DD.MM.YYYY
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
Type: datetime Type: datetime
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
...@@ -1299,10 +1301,11 @@ Type: datetime ...@@ -1299,10 +1301,11 @@ Type: datetime
* *FormElement.parameter*: * *FormElement.parameter*:
* *dateFormat* = yyyy-mm-dd | dd.mm.yyyy * *dateFormat* = YYYY-MM-DD | DD.MM.YYYY
* *showSeconds* = 0|1 - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'. * *showSeconds* = 0|1 - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'.
* *showZero* = 0|1 - For an empty timestamp, With '0' nothing is displayed. With '1' the string '0000-00-00 00:00:00' is displayed. * *showZero* = 0|1 - For an empty timestamp, With '0' nothing is displayed. With '1' the string '0000-00-00 00:00:00' is displayed.
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
Type: extra Type: extra
^^^^^^^^^^^ ^^^^^^^^^^^
...@@ -1944,6 +1947,7 @@ Type: time ...@@ -1944,6 +1947,7 @@ Type: time
* *showSeconds* = `0|1` - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'. * *showSeconds* = `0|1` - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'.
* *showZero* = `0|1` - For an empty timestamp, With '0' nothing is displayed. With '1' the string '00:00[:00]' is displayed. * *showZero* = `0|1` - For an empty timestamp, With '0' nothing is displayed. With '1' the string '00:00[:00]' is displayed.
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
.. _`input-upload`: .. _`input-upload`:
Type: upload Type: upload
......
...@@ -293,6 +293,19 @@ As first option both can be inserted to the setup of the main Template like the ...@@ -293,6 +293,19 @@ As first option both can be inserted to the setup of the main Template like the
Second option is to use the UZH CD template. Second option is to use the UZH CD template.
Following configurations can be set over FormElement.parameter:
dateFormat = *DD.MM.YYYY HH:mm:ss* | *MM-DD-YYYY HH:mm* | *dddd DD.MM.YYYY HH:mm* -> DD:day of month,MM:month value,YYYY:year value,HH:24h,hh:12h AM-PM,mm:minutes,ss:seconds,dddd:written day of week
dateDaysOfWeekEnabled = *0,1,6* -> 0:sunday,1:monday,2:tuesday,3:wednesday,4:thursday,5:friday,6:saturday
dateLocale = *en* | *de* -> Set language
min = *03.05.2022* -> minDate that can be selected
max = *23.07.2022* -> maxDate that can be selected
dateViewModeDefault = *days* | *months* | *years*
clearMe = *0* | *1* -> show clear button
dateShowCalendarWeeks = *false* | *true*
dateUseCurrentDatetime = *false* | *true*
datetimeSideBySide = *false* | *true* -> Show time right to date
.. _form-editor: .. _form-editor:
FormEditor FormEditor
......
...@@ -128,11 +128,12 @@ $(document).ready( function () { ...@@ -128,11 +128,12 @@ $(document).ready( function () {
$('.qfq-datepicker').each(function() { $('.qfq-datepicker').each(function() {
var dates = {}; var dates = {};
var datesToFormat = ["minDate", "maxDate"]; var datesToFormat = ["minDate", "maxDate"];
var correctAttributeNames = ["mindate", "maxdate"];
for(var i = 0; i < datesToFormat.length; i++) { for(var i = 0; i < datesToFormat.length; i++) {
var date = false; var date = false;
if($(this).data(datesToFormat[i])) { if($(this).data(correctAttributeNames[i])) {
var dateArray = $(this).data(datesToFormat[i]).split("."); var dateArray = $(this).data(correctAttributeNames[i]).split(".");
date = dateArray[1] + "." + dateArray[0] + "." + dateArray[2]; date = dateArray[1] + "/" + dateArray[0] + "/" + dateArray[2];
} }
dates[datesToFormat[i]] = date; dates[datesToFormat[i]] = date;
} }
...@@ -147,7 +148,9 @@ $(document).ready( function () { ...@@ -147,7 +148,9 @@ $(document).ready( function () {
showClear: ($(this).data("show-clear-button") !== undefined) ? $(this).data("show-clear-button") : true, showClear: ($(this).data("show-clear-button") !== undefined) ? $(this).data("show-clear-button") : true,
calendarWeeks: ($(this).data("show-calendar-weeks") !== undefined) ? $(this).data("show-calendar-weeks") : false, calendarWeeks: ($(this).data("show-calendar-weeks") !== undefined) ? $(this).data("show-calendar-weeks") : false,
useCurrent: ($(this).data("use-current-datetime") !== undefined) ? $(this).data("use-current-datetime") : false, useCurrent: ($(this).data("use-current-datetime") !== undefined) ? $(this).data("use-current-datetime") : false,
sideBySide: ($(this).data("datetime-side-by-side") !== undefined) ? $(this).data("datetime-side-by-side") : false sideBySide: ($(this).data("datetime-side-by-side") !== undefined) ? $(this).data("datetime-side-by-side") : false,
minDate: dates.minDate,
maxDate: dates.maxDate
}; };
var currentDatePicker = $(this).datetimepicker(options); var currentDatePicker = $(this).datetimepicker(options);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment