for the html do <input type="text" id="deliverydate" /> <input type="hidden" name="formDate" id="actualDate" />
Then the php would be $date = $_POST['formDate']; When I used the datepicker I had to make the altFormat: 'y-mm-dd' for 09-01-01 format and altFormat: 'yy-mm-dd' for 2009-01-01 format. Meaning y=two digit year, yy=four digit year. This may not be the case with different versions of jqueryUI since it doesn't make any sense. Just fyi. On Feb 2, 9:30 am, robg <[email protected]> wrote: > Hi there's a couple of things that id like to ask. > > Here is my code: > > $(function() > { > $('#deliverydate').datepicker({ > minDate: +1, > maxDate: '+1Y', > changeMonth: true, > changeYear: true, > showOn: 'both', > buttonImage: '../../images/general_images/ > calendar.jpg', > buttonImageOnly: true, > altField: '#actualDate', > altFormat: 'yy-mm-dd', > }); > }); > > basically I want the user to see the date in the 'dd-mm-yy > format' (this already happens) but i want the post information to be > in the 'yy-mm-dd format'. > > The document (http://docs.jquery.com/UI/Datepicker/datepicker#options) > suggests: > > Display one date format and send another from a different field. > > $(".selector").datepicker({ > altField: '#actualDate', altFormat: 'yy-mm-dd' }) > > Which i've added, but how would i access that data when the form is > posted? > > Thanks for any help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
