You also might have to DateFormat() the form output, just to be sure.
Remember the datepicker is only a UI tool, you should not use it for
application logic. (i.e when you update your object, make sure you are
updating it with the correct format)
Darren Walker
Internet Application Developer
Redbanner Ltd
-----Original Message-----
From: Darren Walker [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 16:35
To: Spectra-Talk
Subject: RE: cfa_datepicker
This is the code I had to use to get it to work properly. I'm not sure what
happens exactly - the gist is that the datepicker is assuming and American
style date, even if you have set bUseEuroDate = "yes".
<!---Check if date already exists, if not, set to today's date. --->
<cfif Trim(attributes.contextdata.PublicationDate) NEQ "">
<cfset thisDate = DateFormat(attributes.contextdata.PublicationDate,
"dd/mm/yyyy")>
<cfelse>
<cfset thisDate = DateFormat(Now(), "dd/mm/yyyy")>
</cfif>
#thisDate#<br>
<!--- create date for datepicker to use --->
<cfset DatepickerDate = CreateODBCDate(thisDate)>
<!--- datepicker --->
<CFA_DATEPICKER name="#attributes.contextname#.PublicationDate"
defaultDate="#DateFormat(DatepickerDate, 'dd/m/yyyy')#"
bUseEuroDates="Yes"
startYear="2001"
formName="#attributes.contextname#">
hope this helps.
-----Original Message-----
From: Nikki Forshaw [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 16:12
To: Spectra-Talk
Subject: RE: cfa_datepicker
sorry... once again it isn't working... thought we'd solved it with this...
can anyone help?! i am desperate... people are busy populating using this
datepicker and it is now archiving where it shouldn't and not diplaying
where it should etc!
-----Original Message-----
From: Nikki Forshaw [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 12:11 PM
To: Spectra-Talk
Subject: RE: cfa_datepicker
thank you muchly! :)
-----Original Message-----
From: Darren Walker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 11:57 AM
To: Spectra-Talk
Subject: RE: cfa_datepicker
The date picker default date needs to be explicitly date-masked:
defaultDate="#DateFormat(DatepickerDate, 'dd/m/yyyy')#".
This is because the cfa_datepicker code has some holes in it, obviously
patched by Mak Wing Lok.
Otherwise it is a handy tool.
-----Original Message-----
From: Mak Wing Lok [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 10:08
To: Spectra-Talk
Subject: Re: cfa_datepicker
i face this problem before and since i'm using UK date format for all my
application, i modified the cfa_datepicker code where it only process date
in UK format.
----- Original Message -----
From: "Nikki Forshaw" <[EMAIL PROTECTED]>
To: "Spectra-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 4:40 PM
Subject: cfa_datepicker
> hi all,
>
> i have a strange little bug when using cfa_datepicker.... if the day
chosen
> is the 12th or less, the date picker evaluates the day as the month and
the
> month as the day... so, when choosing the 12th september 2001, it stores
the
> date as 09 december 2001.
>
> we have checked the region on the server and gone through about a thousand
> different ideas on how to fix this to no avail.
> does anyone have a clue why it is doing this and how to sort it out?
>
> please help!!!
> thanks,
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.