I have a stock javascript code snippet from https://amsul.ca/pickadate.js/time/
I want this to be a simple drop-down where the client can select a time- 1:00, 1:15, 1:30, etc.
The form appears on the site as a text box only, can you help me pinpoint what I need to do to get this working?
Qualtrics.SurveyEngine.addOnload(function() {
$('.timepicker').pickatime({
// Translations and clear button
clear: 'Clear',
// Formats
format: 'h:i A',
formatLabel: undefined,
formatSubmit: undefined,
hiddenPrefix: undefined,
hiddenSuffix: '_submit',
// Editable input
editable: undefined,
// Time intervals
interval: 30,
// Time limits
min: undefined,
max: undefined,
// Root picker container
container: undefined,
// Hidden input container
containerHidden: undefined,
// Close on a user action
closeOnSelect: true,
closeOnClear: true,
// Events
onStart: undefined,
onRender: undefined,
onOpen: undefined,
onClose: undefined,
onSet: undefined,
onStop: undefined,
// Classes
klass: {
// The element states
input: 'picker__input',
active: 'picker__input--active',
// The root picker and states *
picker: 'picker picker--time',
opened: 'picker--opened',
focused: 'picker--focused',
// The picker holder
holder: 'picker__holder',
// The picker frame, wrapper, and box
frame: 'picker__frame',
wrap: 'picker__wrap',
box: 'picker__box',
// List of times
list: 'picker__list',
listItem: 'picker__list-item',
// Time states
disabled: 'picker__list-item--disabled',
selected: 'picker__list-item--selected',
highlighted: 'picker__list-item--highlighted',
viewset: 'picker__list-item--viewset',
now: 'picker__list-item--now',
// Clear button
buttonClear: 'picker__button--clear'
}
});
});