gpt4 book ai didi

jquery - 时间选择器 slider 未获取设置值

转载 作者:行者123 更新时间:2023-12-01 05:58:06 26 4
gpt4 key购买 nike

您好,我使用 timepicker.js 创建带有小时和分钟 slider 选择的日历。一切都工作得很好,但是当我保存数据时,假设我选择了 14-10-2012 12:33PM,当我在输入字段中调用该值时,它会显示它,但是当我单击输入以显示时间选择器时对话框中,时间和 slider 始终为零。我可以自己编码以显示正确的时间,但我相信时间选择器中应该有一个选项可以做到这一点。

 ![function Timepicker() {
this.regional = \[\]; // Available regional settings, indexed by language code
this.regional\[''\] = { // Default regional settings
currentText: 'Now',
closeText: 'Done',
ampm: false,
amNames: \['AM', 'A'\],
pmNames: \['PM', 'P'\],
timeFormat: 'hh:mm tt',
timeSuffix: '',
timeOnlyTitle: 'Choose Time',
timeText: 'Time',
hourText: 'Hour',
minuteText: 'Minute',
secondText: 'Second',
millisecText: 'Millisecond',
timezoneText: 'Time Zone'
};
this._defaults = { // Global defaults for all the datetime picker instances
showButtonPanel: true,
timeOnly: false,
showHour: true,
showMinute: true,
showSecond: false,
showMillisec: false,
showTimezone: false,
showTime: true,
stepHour: 1,
stepMinute: 1,
stepSecond: 1,
stepMillisec: 1,
hour: 0,
minute: 0,
second: 0,
millisec: 0,
timezone: '+0000',
hourMin: 0,
minuteMin: 0,
secondMin: 0,
millisecMin: 0,
hourMax: 23,
minuteMax: 59,
secondMax: 59,
millisecMax: 999,
minDateTime: null,
maxDateTime: null,
onSelect: null,
hourGrid: 0,
minuteGrid: 0,
secondGrid: 0,
millisecGrid: 0,
alwaysSetTime: true,
separator: ' ',
altFieldTimeOnly: true,
showTimepicker: true,
timezoneIso8609: false,
timezoneList: null,
addSliderAccess: false,
sliderAccessArgs: null
};][1]

最佳答案

要仅使用时间范围内的时间,请使用 $.timepicker.timeRange():

var startTimeTextBox = $('#range_example_3_start');
var endTimeTextBox = $('#range_example_3_end');

$.timepicker.timeRange(
startTimeTextBox,
endTimeTextBox,
{
minInterval: (1000*60*60), // 1hr
timeFormat: 'HH:mm',
start: {}, // start picker options
end: {} // end picker options
}
);

关于jquery - 时间选择器 slider 未获取设置值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13492602/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com