dhodgdon
Posts: 80
|
| Posted: 04/16/2005, 5:06 AM |
|
I don't know Java scripting and I am asking for help modifying the date picker js to recognize the dddd format and open to the date in the control. Alternatively, recommending another third party date picker that works is okay too.
When a default value is used or when a date exists in a control linked to the CCS data picker, the picker opens with that date. When the control is blank, the data picker opens to the current date.
CCS, contrary to the date format table in help , doesn't support day of week, specifically ddd and dddd format. Yes Software tech support provided me a work around (included below). However, the date picker doesn't recognize the format and defaults on open to the current date. It does correctly put the selected date with proper formatting in the control.
Thanks for any help provided.
Here are the modifications implemented.
Also "ddd" and "dddd" day formats are not currently supported by CCS. The solution is to modify generated code in Common.asp file:
1. To class clsCCSDateConstants -> Private Sub Class_Initialize() function add
...
DateMasks("ddd") = 0
DateMasks("dddd") = 0
End Sub
2.to CCParseDAte function add another CASE operator:
...
Case "ddd", "dddd"
Dim DayArray, DayNumber, DayName
DayNumber = 0
DayName = UCase(DatePartStr)
If MaskPart = "ddd" Then _
DayArray = CCSDateConstants.ShortWeekdays _
Else _
DayArray = CCSDateConstants.Weekdays
While DayNumber < 6 AND UCase(DayArray(DayNumber)) <> DayName
DayNumber = DayNumber + 1
Wend
If DayNumber = 6 Then
If UCase(DayArray(6)) <> DayName Then _
Err.Raise 4000, "Common Functions. ParseDate function","Mask mismatch."
End If
_________________
Regards,
David Hodgdon
|
 |
 |
dhodgdon
Posts: 80
|
| Posted: 04/25/2005, 8:52 AM |
|
Yes Software provided great support enabling this format for me. The work around required a new DatePicker.ccl which the support group sent me. Since there is no way to attach a file to these posts, I will send you the file if you send me a PM that includes your email address. I suspect that Yes Software support will be able to provide it to you if you contact them and reference support case #983912341.
The work around is a three step process. Step 1 & 2 require changes to the Common.asp file. Step 3 installs a new DatePicker.ccl
Step 1. To class clsCCSDateConstants -> Private Sub Class_Initialize() function add
...
DateMasks("ddd") = 0
DateMasks("dddd") = 0
End Sub
Step 2. To CCParseDAte function add another CASE operator:
...
Case "ddd", "dddd"
Dim DayArray, DayNumber, DayName
DayNumber = 0
DayName = UCase(DatePartStr)
If MaskPart = "ddd" Then _
DayArray = CCSDateConstants.ShortWeekdays _
Else _
DayArray = CCSDateConstants.Weekdays
While DayNumber < 6 AND UCase(DayArray(DayNumber)) <> DayName
DayNumber = DayNumber + 1
Wend
If DayNumber = 6 Then
If UCase(DayArray(6)) <> DayName Then _
Err.Raise 4000, "Common Functions. ParseDate function","Mask mismatch."
End If
Step 3. Copy the new DatePicker.ccl to ...\CodeChargeStudio\Components\CodeTemplates\Common\ folder (just in case back up the old file).
After completing these three steps, restart CCS and regenerate the project.
_________________
Regards,
David Hodgdon
|
 |
 |
DonB
|
| Posted: 04/25/2005, 5:52 PM |
|
Just a comment - I think Yes would appreciate anyone wanting this to obtain
it directly from them. If they find a problem with it or just improve it
they'll know who has it and can send an email to all of the affected users.
It would also inform them of the interest in it, which would likely improve
its chances of appearing in some possible future release.
--
DonB
http://www.gotodon.com/ccbth
"dhodgdon" <dhodgdon@forum.codecharge> wrote in message
news:2426d122fcf8ae@news.codecharge.com...
> Yes Software provided great support enabling this format for me. The work
> around required a new DatePicker.ccl which the support group sent me.
Since
> there is no way to attach a file to these posts, I will send you the file
if
> you send me a PM that includes your email address. I suspect that Yes
Software
> support will be able to provide it to you if you contact them and
reference
> support case #983912341.
>
> The work around is a three step process. Step 1 & 2 require changes to
the
> Common.asp file. Step 3 installs a new DatePicker.ccl
>
> Step 1. To class clsCCSDateConstants -> Private Sub Class_Initialize()
function
> add
> ..
> DateMasks("ddd") = 0
> DateMasks("dddd") = 0
> End Sub
>
> Step 2. To CCParseDAte function add another CASE operator:
> ..
> Case "ddd", "dddd"
> Dim DayArray, DayNumber, DayName
> DayNumber = 0
> DayName = UCase(DatePartStr)
> If MaskPart = "ddd" Then _
> DayArray = CCSDateConstants.ShortWeekdays _
> Else _
> DayArray = CCSDateConstants.Weekdays
> While DayNumber < 6 AND UCase(DayArray(DayNumber)) <> DayName
> DayNumber = DayNumber + 1
> Wend
> If DayNumber = 6 Then
> If UCase(DayArray(6)) <> DayName Then _
> Err.Raise 4000, "Common Functions. ParseDate function","Mask mismatch."
> End If
>
> Step 3. Copy the new DatePicker.ccl to
> ..\CodeChargeStudio\Components\CodeTemplates\Common\ folder (just in case
back
> up the old file).
>
> After completing these three steps, restart CCS and regenerate the
project.
>
> _________________
> Regards,
> David Hodgdon
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|