[UPDT] ATTENDANCE: Time format issue fixes

This commit is contained in:
Horilla
2024-06-24 17:52:48 +05:30
parent 5fdc76edf1
commit 27fb7e3d60

View File

@@ -1745,8 +1745,22 @@ var formattedDate = dateFormatter.getFormattedDate(currentDate);
$(".timeformat_changer").each(function (index, element) {
var currentTime = $(element).text().trim();
if (currentTime === 'midnight'){
if (timeFormatter.timeFormat === 'hh:mm A') {
formattedTime = '12:00 AM'
}else{
formattedTime = '00:00'
}
}
else if (currentTime === 'noon'){
if (timeFormatter.timeFormat === 'hh:mm A') {
formattedTime = '12:00 PM'
}else{
formattedTime = '12:00'
}
}
// Checking currentTime value is a valid time.
if (/[\.:]/.test(currentTime)) {
else if (/[\.:]/.test(currentTime)) {
var formattedTime = timeFormatter.getFormattedTime(currentTime);
} else if (currentTime) {
var formattedTime = currentTime;