hi
I put 2 textbox in page:
1-txttime 2-txtdate
for txttime I use below code to show time format in textbox like:
--:--
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.0/jquery.mask.min.js"></script>
<script type="text/javascript">
$(function () {
$('[id*=txtTime]').mask('00:00');
$('[id*=txtTime]').on("change", function () {
var reg = /^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;
if (!reg.test($('[id*=txtTime]').val())) {
alert("Please enter valid time in 24 hour format");
$('[id*=txtTime]').val('');
$('[id*=txtTime]').focus();
}
});
});
</script>
now I want use date format for txtdate
I want it show ----/--/-- in textbox like code I use for time
how I can do it?
best regards
neda