I need your help.
Is it programmatically possible to use the Jquery picker, ie. trigger the datepicker by calling a function and then store the selected date into a var as opposed to a hidden input box?
Any help with this would be greatly appreciated.
The current example that I have triggers the date picker from a function but uses a hidden input box.
<html>
<head>
<!-- LOAD JQUERY LIBRARY: -->
<link href="jq/jquery-ui.css" type="text/css" rel="stylesheet" />
<script src="jq/jquery.min.js" type="text/javascript"> </script>
<script src="jq/jquery-ui.min.js" type="text/javascript"> </script>
<script type="text/javascript">
function test() {
$("#d1").datepicker().datepicker("show");
}
</script>
</head>
<body>
<input style="display: none" type="text" id="d1">
<a href="javascript:test()">test</a>
</body>
</html>
Thanks in advance,
Cheers,
Jay
Just attach it to a div instead of an input control.
The JSFiddle.
The HTML:
The JS: