Rate this:
See more:
Hai

Actually i have a grid view with some textboxes, there i have to enter time in one textbox if i give time in text box it should take time in ascending order only. for eg: 1st time if i give 8:30 and next time if i give 8:20 it should not accept it, it should take time above 8:30 and after 08:30 values.
it should not accept time below 08:30.

Posted 29-Apr-13 22:05pm
Edited 29-Apr-13 22:51pm
v2
Rohan Leuva at 30-Apr-13 3:13am

can you elaborate more on this question?its not clear what you want to do?provide some example if any.
Swetha Bisa at 30-Apr-13 3:21am

actually i have a grid view with some textboxes, there i have to enter time in one textbox if i give time in text box it should take time in ascending order only. for eg: 1st time if i give 8:30 and next time if i give 8:20 it should take 8:30 and after 08:30 values,
it should not accept below it
Jithin Geroge at 30-Apr-13 3:15am

Please provide some more detail about ur question ... Not getting clear idea...
Swetha Bisa at 30-Apr-13 3:48am

actually i have a grid view with some textboxes, there i have to enter time in one textbox if i give time in text box it should take time in ascending order only. for eg: 1st time if i give 8:30 and next time if i give 8:20 it should take 8:30 and after 08:30 values,
it should not accept below it
Roshan Samrit at 30-Apr-13 4:05am

on blur event of textbox u can call function and hold Previous values in temp variable so that you can compare both values.

I think you have some set of textboxes and in one text box if you give time 8:30 than in next text box user should allow only take 8:30 and after 08:30 values right
Swetha Bisa at 30-Apr-13 5:46am

yes you are corrrect...

Rate this:

## Solution 1

Hi,

```<pre><script type="text/javascript">
function checkTime(id) {

var val = \$('#'+id).val();
var t = \$('#txtTime1').val();
if (val != "") {
if (val > t) {

}
else {
}
}
}

</script>

<input type="text" id="txtTime1" />
<input type="text" id="txtTime2" onblur="checkTime(this.id)" />
<input type="text" id="txtTime3" onblur="checkTime(this.id)" />

```