Timepicker滑块未获取设定值

时间:2012-11-21 11:47:49

标签: jquery datepicker timepicker

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

 ![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]

1 个答案:

答案 0 :(得分:0)

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

kill()