Revert "Set default date during picker initialization"

This reverts commit d397d169
This commit is contained in:
Christopher C. Wells 2022-08-04 08:16:01 -07:00
parent d187ac58ae
commit 5a257f5b11
7 changed files with 1 additions and 37 deletions

View File

@ -47,18 +47,6 @@ BabyBuddy.DatetimePicker = function ($, moment) {
},
viewMode: 'times',
};
// Provide the initial date value from the form, if available. This is not
// strictly necessary but acts as a workaround for a bug with certain
// locales e.g., Portuguese (pt), that causes the default value to be lost
// in the form.
// @see https://github.com/tempusdominus/bootstrap-4/issues/189#issuecomment-590791416
var id = element.attr('id');
var input = element.find(`input[data-target="#${id}"]`)
if (input.length === 1) {
defaultOptions.date = input.val()
}
element.datetimepicker($.extend(defaultOptions, options));
}
};

View File

@ -47,18 +47,6 @@ BabyBuddy.DatetimePicker = function ($, moment) {
},
viewMode: 'times',
};
// Provide the initial date value from the form, if available. This is not
// strictly necessary but acts as a workaround for a bug with certain
// locales e.g., Portuguese (pt), that causes the default value to be lost
// in the form.
// @see https://github.com/tempusdominus/bootstrap-4/issues/189#issuecomment-590791416
var id = element.attr('id');
var input = element.find(`input[data-target="#${id}"]`)
if (input.length === 1) {
defaultOptions.date = input.val()
}
element.datetimepicker($.extend(defaultOptions, options));
}
};

BIN
static/babybuddy/js/app.1eb586ba082f.js.gz generated Normal file

Binary file not shown.

Binary file not shown.

View File

@ -47,18 +47,6 @@ BabyBuddy.DatetimePicker = function ($, moment) {
},
viewMode: 'times',
};
// Provide the initial date value from the form, if available. This is not
// strictly necessary but acts as a workaround for a bug with certain
// locales e.g., Portuguese (pt), that causes the default value to be lost
// in the form.
// @see https://github.com/tempusdominus/bootstrap-4/issues/189#issuecomment-590791416
var id = element.attr('id');
var input = element.find(`input[data-target="#${id}"]`)
if (input.length === 1) {
defaultOptions.date = input.val()
}
element.datetimepicker($.extend(defaultOptions, options));
}
};

Binary file not shown.

File diff suppressed because one or more lines are too long