Menu

#12 choosing a date format

open
nobody
None
5
2005-01-03
2005-01-03
Anonymous
No

I am trying to set the date format that is displayed in
my input box to mmddyyyy or for dynarch %m%d%Y.

I have been unable to do this. Here is what I have tried.

in calendar-setup.js I have set the following.
param_default("ifFormat", "%m%d%Y");
param_default("daFormat", "%m%d%Y");

in calendar-en_US.js I have set the following
Calendar._TT["DEF_DATE_FORMAT"] = "%m%d%Y";

on jsp I have set the following
Calendar.setup({inputField:"f_date_dfRefinanceDate",
button:"f_trigger_dfRefinanceDate",singleClick:true,
ifFormat:Calendar._TT["DEF_DATE_FORMAT"],
daFormat:Calendar._TT["DEF_DATE_FORMAT"]});

This returns the date as mm/dd/yyyy

I have also tried leaving off the ifFormat and daFormat
which then sets the date in the format yyyy/mm/dd

Can you help me?

Discussion


Log in to post a comment.