Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am trying to set a minimum and maximum value for my timepicker with jquery .
$('#edit-field-tes4-und-0-value-timepicker-popup-1').timepicker({
timeFormat: 'h',
interval: 60,
minTime: '10',
maxTime: '6pm',
defaultTime: '11',
startTime: '10',
dynamic: false,
dropdown: true,
scrollbar: true
});
When i try to execute this am getting "date_popup.js - "date_popup.js:49 Uncaught TypeError: $(...).timepicker(...).addClass is not a function" error .
Please assist.
Thanks,
kavitha.
Comments
Comment #2
Michael_Lessard_micles.biz CreditAttribution: Michael_Lessard_micles.biz commentedI also wanted to change the options for the timepicker, but doing so seems to break it.
Any ideas ? Have you fond a work-around since you posted this in August 2016 ?
Comment #3
Michael_Lessard_micles.biz CreditAttribution: Michael_Lessard_micles.biz commentedSo, in sum, the default values for the timepicker are set in the file date_popup.module.
That sub-module only set four default values, based on Date module settings.
If I change values in the js script directly, I create a conflict.
BUT logically I can manually edit date_popup.module [I tried and failed].
EDIT: tried the above [adding lines like: 'minTime' => '09:00',] and it does nothing.