As soon as user clicks submit button how to skip the minutes value from the user input or assign the value to zero and pass value ? In my code im trying to assign the value to zero and pass the value.
Below is my HTML CODE
<input id="dateInputone" name="dateipone" type="datetime-local" step="600" style="display:none;">
<input type="submit" value="submit" onclick="validate_time(this.value);">
Below is my javascript CODE
function validate_time(min)
{
var allowed_values = new Array("00");
var minutes = min.split(':').pop();
for(var i=0; i = allowed_values.length; i++)
{
if(allowed_values[i] == minutes)
{
return true;
}
else
{
return minutes.push("00");
}
}
}