timepicker-ui是一款时间选择器JavaScript库,可定制的,美丽的,移动手机端和电脑端时间选择器js插件。所有的配置参数amLabel: 'AM', appendModalSelector: '', backdrop: true, cancelLabel: 'CANCEL', enableScrollbar: true, enableSwitchIcon: false, enterTimeLabel: 'Enter Time', focusInputAfterCloseModal: false, hourMobileLabel: 'Hour', iconTemplate: 'keyboard', iconTemplateMobile: 'schedule', incrementHours: 1, incrementMinutes: 1, inputTemplate: '', minuteMobileLabel: 'Minute', mobile: false, okLabel: 'OK', pmLabel: 'PM', selectTimeLabel: 'Select Time', switchToMinutesAfterSelectHour: false, theme: 'basic',一些事件处理myTimePicker.addEventListener('show', (event) => console.log(event.detail)); myTimePicker.addEventListener('cancel', (event) => console.log(event.detail)); myTimePicker.addEventListener('accept', (event) => console.log(event.detail)); myTimePicker.addEventListener('update', (event) => console.log(event.detail)); myTimePicker.addEventListener('selectminutemode', (event) => console.log(event.detail)); myTimePicker.addEventListener('selecthourmode', (event) => console.log(event.detail)); myTimePicker.addEventListener('selectamtypemode', (event) => console.log(event.detail)); myTimePicker.addEventListener('selectamtypemode', (event) => console.log(event.detail));
未经允许不得转载: ICode联盟 » 插件特效 » timepicker-ui时间选择器js插件