Hi guys
Just thought I'd share with you this very simply Jquery datepicker implementation. As we know the date field in Squiz isn't really that pretty, offering either select or text fields, for each of day, month, year and so on...
This simple little bit of code grabs the date from a datepicker populated field, and then splits it into the form fields you set up.
<script> $(function() { $('#full').datepicker({ onSelect: function(dateText, inst) { var pieces = dateText.split('/'); $('#q8month').val(pieces[0]); $('#q8day').val(pieces[1]); $('#q8year').val(pieces[2]); } }); }); </script>
<input type="hidden" name="q59826:q8show" value="dmy"/>
<input type='text' id='full' name='fulldate'>
<input type="hidden" name="q59:q8value[d]" value="" size="2" maxlength="2" id="q8day" class="form-field"/>
<input type="hidden" name="q59:q8value[m]" value="" size="2" maxlength="2" id="q8month" class="form-field"/>
<input type="hidden" name="q59:q8value[y]" value="" size="4" maxlength="4" id="q8year" class="form-field"/>
<input type="hidden" name="q59:q8value[h]" value=""/>
<input type="hidden" name="q59:q8value[i]" value=""/>
<input type="hidden" name="q59:q8value[s]" value=""/>
Hope you can find some use for it.. cheers