Can I define a global date format avoiding to specifing it everytime in definition & mapping?
Thanks. bye, Luca Garulli OrienTechnologies.com (the light ODBMS, all in one JDO solution) On Thu, 14 Oct 2004 08:53:17 +0200, Jan Hoskens <[EMAIL PROTECTED]> wrote: > Do you mean entering a date in the webbrowser? When setting a date in > the definition with a specified format, this format is used for > entering dates in the input fields of your browser. If you want your > date format in your xml file (binded data source/destination) you need > to set your binding formatting. > > So > <fd:field id="input"> > <fd:label>mylabel</fd:label> > <fd:datatype base="date"> > <fd:convertor type="formatting"> > <fd:patterns> > <fd:pattern>dd/MM/yyyy</fd:pattern> > </fd:patterns> > </fd:convertor> > </fd:datatype> > </fd:field> > > Would make you're browser inputfield accept the defined format (if this > is what you needed, didn't it work? Also when specifying a pattern, try > leaving out the style="long" attribute.) > > The next sample should set the date format in your xml file that was > binded to your form: > > <fb:value id="input" path="input"> > <fd:convertor datatype="date"> > <fd:patterns> > <fd:pattern>dd/MM/yyyy</fd:pattern> > > </fd:patterns> > </fd:convertor> > </fb:value> > > Hope this helps. > > Kind Regards, > Jan > > > > [EMAIL PROTECTED] wrote: > > > Hi , > > How can we change the cocoon default date format. cocoon is accepts > > MM/dd/YY. When we change the format as YYYY-mm-DD. Cocoon doesn't > > allows us to enter date in this format. > > > > We have the tried the following : > > > > <fd:field id="Date"> > > <fd:label><i18n:text> Date: </i18n:text></fd:label> > > <fd:datatype base="date"> > > <fd:converter type="formatting" style="long"> > > <fd:patterns> > > <fd:pattern>YYYY-mm-DD</fd:pattern> > > </fd:patterns> > > </fd:converter> > > </fd:datatype> > > <fd:validation /> > > </fd:field> > > > > Can any one please let us know where we are going wrong or any pointer > > to achieve the same would appreciated > > Thanks in advance. > > Regards, > > Moin > > > > > > > > > > > > Confidentiality Notice > > > > The information contained in this electronic message and any > > attachments to this message are intended > > for the exclusive use of the addressee(s) and may contain confidential > > or privileged information. If > > you are not the intended recipient, please notify the sender at Wipro > > or [EMAIL PROTECTED] immediately > > and destroy all copies of this message and any attachments. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
