BATCHCARD TIME VALIDATION ISSUE FIXED
This commit is contained in:
parent
b5db2ed3b9
commit
e7352c31f0
@ -337,8 +337,7 @@ var stop = $('#auto_stop').val();
|
||||
if(start != '' && stop != '')
|
||||
{
|
||||
|
||||
if(start.length != 5)
|
||||
{
|
||||
if(start.length != 5){
|
||||
alert('Please Enter Time in 24 Hrs Format.If time is 9:25,Feed like 09:25');
|
||||
document.getElementById('auto_start').value="";
|
||||
setTimeout(function(){
|
||||
@ -349,8 +348,7 @@ if(start != '' && stop != '')
|
||||
}
|
||||
|
||||
|
||||
if(stop.length != 5)
|
||||
{
|
||||
if(stop.length != 5){
|
||||
alert('Please Enter Time in 24 Hrs Format.If time is 9:25,Feed like 09:25');
|
||||
document.getElementById('auto_stop').value="";
|
||||
setTimeout(function(){
|
||||
@ -359,11 +357,12 @@ if(stop.length != 5)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var atime = '';
|
||||
start = start.split(":");
|
||||
stop = stop.split(":");
|
||||
|
||||
if(isNaN(start[0]) || isNaN(start[1]) )
|
||||
if(isNaN(start[0]) || isNaN(start[1]) || parseFloat(start[0]) > 24 || parseFloat(start[1]) > 60)
|
||||
{
|
||||
alert("please Enter Valid Time");
|
||||
document.getElementById('auto_start').value = '';
|
||||
@ -374,7 +373,7 @@ if(stop.length != 5)
|
||||
|
||||
}
|
||||
|
||||
if(isNaN(stop[0]) || isNaN(stop[1]))
|
||||
if(isNaN(stop[0]) || isNaN(stop[1]) || parseFloat(stop[0]) > 24 || parseFloat(stop[1]) > 60)
|
||||
{
|
||||
alert("please Enter Valid Time");
|
||||
document.getElementById('auto_stop').value = '';
|
||||
@ -385,20 +384,13 @@ if(stop.length != 5)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if((start[0] > stop[0]))
|
||||
{
|
||||
alert('Enter Valid Time');
|
||||
document.getElementById('auto_stop').value = '';
|
||||
setTimeout(function(){
|
||||
$('#auto_stop').focus();},0
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
if((start[1] > stop[1]))
|
||||
{
|
||||
alert('Enter Valid Time');
|
||||
document.getElementById('auto_stop').value = '';
|
||||
|
||||
setTimeout(function(){
|
||||
$('#auto_stop').focus();},0
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user