Javascript Date Picker Into A Textfield
Posted
by
Dilukshan Mahendra
on Stack Overflow
See other posts from Stack Overflow
or by Dilukshan Mahendra
Published on 2013-11-01T15:50:32Z
Indexed on
2013/11/01
15:53 UTC
Read the original article
Hit count: 261
JavaScript
|datepicker
I'm trying to use a date picker for a date field but my date fields ID is a dynamic id, since the fields generates in table rows, like
<input type="text" id="date<%=n%>"/>
But my date picker script requires the ID to attach the date picker into the above text field like below,
<script type="text/javascript">
new datepickr('datepick', { dateFormat: 'Y-m-d' });
</script>
Is there any other way to make this work?
© Stack Overflow or respective owner