Hi,
I have a date field where the user can enter the date manually or can select from the datepicker.
My problem is, if the user enters date as 6/4/2012, I need to reformat it to 06/04/2012 (DD/MM/YYYY).
I've tried many methods but not sucessfull.
Can anyone please help.
Regards,Raghu.
Views
Replies
Total Likes
You can do that without scripting using Patterns.
Select your date field and then click on Patterns on the Field tab of the Object palette.
The Display pattern is where you set how you want the data to look. You can set up different Edit patterns to accomodate different ways someone might fill the date in. And a Validation pattern to make sure the entered date is correctly formatted.
Radzmar has a great blog post describing all this here:
Views
Replies
Total Likes
You can format the date in datepicket widget using this code where you have linked the widget to your form field:
<td><script type="text/javascript">
// BeginOAWidget_Instance_2137022: #datepicker
$(function() {
$("#datepicker").datepicker({ showOtherMonths: false, dateFormat: 'dd-mm-yy' });
});
// EndOAWidget_Instance_2137022
</script>
<input type="text" id="datepicker" />
</td>
Views
Replies
Total Likes
That looks like javascript for html, this is an Adobe LiveCycle discussion group and that code won't work.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies