In my html I have two fields, the start date and the end date and then a table below that I would like to soft through.
I have it to the point where I can show and hide if the date is equal to what is in the input, but I seem to be having trouble seeing if it is in between the two dates.
So to start with I'm grabbing the start and end dates
var start = $(this).parent().find('.startdate').find('input').val();
var end = $(this).parent().find('.enddate').find('input').val();
and then I'm looping through all the dates in the table and grabbing their value
$($('.revRec')).each(function( index ) {
var dateText = $(this).text();
});
And then within that loop I am trying to see if the date in the table falls in-between the start and end dates.
I was doing something like this, which I know is not right
if( $(this).text() == start){do stuff}
Should I be casting these values to numbers or dates? I've never worked with dates before or comparing them. Any help would be appreciated!