}
else {
element.dataset.value = time.toString();
- const format = isTimeOnly ? "formatTime" : isDateTime ? "formatDateTime" : "formatDate";
- value = DateUtil[format](date);
+ if (isTimeOnly) {
+ value = DateUtil.formatTime(date);
+ }
+ else {
+ if (isDateTime) {
+ value = DateUtil.formatDateTime(date);
+ }
+ else {
+ value = DateUtil.formatDate(date);
+ }
+ }
}
}
const isEmpty = value.length === 0;
value = "";
} else {
element.dataset.value = time.toString();
- const format = isTimeOnly ? "formatTime" : isDateTime ? "formatDateTime" : "formatDate";
- value = DateUtil[format](date);
+ if (isTimeOnly) {
+ value = DateUtil.formatTime(date);
+ } else {
+ if (isDateTime) {
+ value = DateUtil.formatDateTime(date);
+ } else {
+ value = DateUtil.formatDate(date);
+ }
+ }
}
}