forked from mirrors/easyappointments
Parse the working plan start and end value correctly, depending on the current time format setting.
This commit is contained in:
parent
2feb0d5c99
commit
0cf99d9538
1 changed files with 4 additions and 2 deletions
|
@ -629,13 +629,15 @@ App.Utils.WorkingPlan = (function () {
|
|||
get() {
|
||||
const workingPlan = {};
|
||||
|
||||
const timeFormat = App.Vars.time_format === 'regular' ? 'h:mm a' : 'HH:mm';
|
||||
|
||||
$('.working-plan input:checkbox').each(
|
||||
function (index, checkbox) {
|
||||
const id = $(checkbox).attr('id');
|
||||
if ($(checkbox).prop('checked') === true) {
|
||||
workingPlan[id] = {
|
||||
start: moment($('#' + id + '-start').val(), 'HH:mm').format('HH:mm'),
|
||||
end: moment($('#' + id + '-end').val(), 'HH:mm').format('HH:mm'),
|
||||
start: moment($('#' + id + '-start').val(), timeFormat).format('HH:mm'),
|
||||
end: moment($('#' + id + '-end').val(), timeFormat).format('HH:mm'),
|
||||
breaks: []
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue