We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I am using bootstrap-timepicker plugin with milton admin panel. I want to define time range from 10:am to 11:00 pm.
can you please guide me, how it is possible?
Thanks,
The text was updated successfully, but these errors were encountered:
This is some self-written function. Maybe it'll help someone.
function compareTimestamps(from, to) { var fromCurHoursIsSet = false, fromMinHours = null, fromMinMinutes = null, toCurHoursIsSet = false, toMinHours = null, toMinMinutes = null; $(from).timepicker().on('changeTime.timepicker', function (e) { fromMinHours = e.time.minutes + 15 === 60 ? (e.time.hours >= 24 ? 0 : e.time.hours + 1) : e.time.hours; fromMinMinutes = e.time.minutes + 15 === 60 ? 0 : e.time.minutes + 15; if ( toCurHoursIsSet && Date.parse(`01/01/2011 ${e.time.hours}:${e.time.minutes}:00`) > Date.parse(`01/01/2011 ${toMinHours}:${toMinMinutes}:00`) ) { $(from).timepicker('setTime', `${toMinHours}:${toMinMinutes}`); if (!fromCurHoursIsSet) { fromCurHoursIsSet = true; } } }); $(to).timepicker().on('changeTime.timepicker', function (e) { toMinHours = e.time.minutes - 15 === 60 ? (e.time.hours >= 24 ? 0 : e.time.hours - 1) : e.time.hours; toMinMinutes = e.time.minutes - 15 === 60 ? 45 : e.time.minutes - 15; if (Date.parse(`01/01/2011 ${e.time.hours}:${e.time.minutes}:00`) < Date.parse(`01/01/2011 ${fromMinHours}:${fromMinMinutes}:00`)) { $(to).timepicker('setTime', `${fromMinHours}:${fromMinMinutes}`); if (!toCurHoursIsSet) { toCurHoursIsSet = true; } } }); } // Private functions var bsTimePickerInit = function () { $('#timepicker_1, #timepicker_2').timepicker({ defaultTime: '', maxHours: 24, showMeridian: false }); compareTimestamps('#timepicker_1', '#timepicker_2'); };
Sorry, something went wrong.
No branches or pull requests
Hello,
I am using bootstrap-timepicker plugin with milton admin panel. I want to define time range from 10:am to 11:00 pm.
can you please guide me, how it is possible?
Thanks,
The text was updated successfully, but these errors were encountered: