Page 1 of 1

datetimepicker settings

Posted: 2019-11-29 15:14
by G Belgrado
on datetimepicker
in this function to hide seconds
https://bigprof.com/blog/appgini/how-to ... ime-field/

Code: Select all

$j(function() {
    $j('#datetimefield').parents('.input-group')
        .datetimepicker(
            'format', 
            AppGini.datetimeFormat('dt').replace(/:ss/, '')
        );
})
it is possible to do
settings to have a range of hours (example 09 am -- 09 pm)
from which to select
and step minutes every 15 ??

Re: datetimepicker settings

Posted: 2019-12-02 19:11
by Alisson
This is working for me:

Code: Select all

$j(function () {
  $j('#datetimefield').datetimepicker({
    minDate: moment({hour: 9, minute: 00}),
    maxDate: moment({hour: 21, minute: 15}),
    stepping: 15
  });
});

Re: datetimepicker settings

Posted: 2019-12-02 21:41
by G Belgrado
Thanks Alisson
but it does not work.
It probably doesn't have the same syntax
of the function that hides the seconds