0

I trying to validate a text field whether the entered input type is in date pattern or not. I seen this and this but no result. So I want to get calender on button click and fill text filed with selected date. How to validate this?

Thanks in advance..

Community
  • 1
  • 1
Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138

1 Answers1

1

Its working for me try this:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>
Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138
Raju Sidda
  • 916
  • 1
  • 7
  • 12