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.
Checked the issue queue, could not find anything on this, so wished to briefly ask.
I have a request for a client to add a timepicker to the time field of the scheduler date and time fields. I added the jQuery timepicker library, but the drop down gives me hour, minute and seconds, whereas I wish to limit the picker to hours.
It seems as though you can configure this with the Date Wizard, but it asks for the ID for the content type, and what looks like the field ID.
Does anyone know how I can do this so that the timepicker in the Scheduler time field is limited to hours?
Thanks in advance.
Comments
Comment #1
mcjim CreditAttribution: mcjim commentedFrom what I can tell, it's currently limited to hours, minutes and seconds (because of some parsing code for dates/times in scheduler.module).
Comment #2
jonathan1055 CreditAttribution: jonathan1055 commentedHello,
Are you using the Date Popup option in scheduler? That gives you a calendar for selecting the date, and Date provides jQuery to control the time entry.
However, there is the issue #1855810: Define #return_value_format for date_popup to set the form value where Date Popup is not fully recognising the output format requested. If that issue was resolved then we could probably allow more options for the time format in Scheduler.
Alternatively, if you can give us an example of the ids which are required, we can add them to the scheduler form if they are not already there.
Jonathan
Comment #3
jonathan1055 CreditAttribution: jonathan1055 commentedGood News. Now that we have implemented #2054777: Customizable minute increments for timepicker options you can set the minute increment to 60 and achieve exactly what you want, without us having to wait for #1855810: Define #return_value_format for date_popup to set the form value.
This functionality will be in the forthcoming 7.x-1.2 release