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

kavithasethu created an issue.

Michael_Lessard_micles.biz’s picture

I 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 ?

Michael_Lessard_micles.biz’s picture

So, 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.