Merge pull request #3250 from aragonc/1.11.x

adding time increment for DateRangePicker
pull/3213/head^2
Julio Montoya 6 years ago committed by GitHub
commit 2bbdd1e5fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      main/inc/lib/formvalidator/Element/DateRangePicker.php
  2. 3
      main/install/configuration.dist.php

@ -182,12 +182,17 @@ class DateRangePicker extends HTML_QuickForm_text
$timePicker = 'false';
}
$timeIncrement = 30;
if (api_get_configuration_value('timepicker_increment')) {
$timeIncrement = api_get_configuration_value('timepicker_increment');
}
// timeFormat: 'hh:mm'
$js .= "<script>
$(function() {
$('#$id').daterangepicker({
timePicker: $timePicker,
timePickerIncrement: 30,
timePickerIncrement: $timeIncrement,
timePicker12Hour: false,
$defaultDates
$maxDate

@ -1536,3 +1536,6 @@ $_configuration['auth_password_links'] = [
// You need add a new option called "confirmation" to the registration settings
//INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_registration', 'confirmation', 'MailConfirmation');
// ------ (End) Custom DB changes
//Allows to add increment in minutes to the date range component timepicker, example: 5,10,30 minutes
//$_configuration['timepicker_increment'] = 5;

Loading…
Cancel
Save