Link to home
Create AccountLog in
Avatar of -Dman100-
-Dman100-Flag for United States of America

asked on

datepicker format input 'mm/dd/yyyy'

I'm developing on the Force.com platform using Apex and visualforce and I'm trying to implement the datepicker to format an inputText field to display the date in the 'mm/dd/yyyy' format when the page posts back.

When I select the date it is correctly formatted as 'mm/dd/yyyy' in the input field.  When a post back occurs the date format changes to this: Fri Jul 12 00:00:00 GMT 2013.  I want to keep the date in the correct 'mm/dd/yyyy' format when the page posts back.

I thought I could do this with jquery, but I still fairly new with jquery and might be missing something simple.

Here is how I'm implementing the jquery datepicker:

	<script type="text/javascript">
		
		var j$ = jQuery.noConflict();
		
		j$(document).ready(function(){
			j$('[id$=tradeStartDateFilter]').datepicker({dateFormat: 'mm/dd/yy'});
		});
                   </script>

Open in new window


Thanks for any help.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of -Dman100-

ASKER

Thanks for the responses, but I resolved it by changing the code in the class file and making my properties strings instead of dates and manipulating the format in the back end.