gproulx
Posts: 68
|
| Posted: 09/15/2008, 7:12 AM |
|
HI,
i wanted to know if someone tried the 'Calendar with Date Selection' example pack 2 .
I follow all the steps and i didn't get the the link visible for the dates i plan an event.
I try it in CCS 3 & 4 and it didn't work in any of these. I also publish directly the page with no modification from the example pack and the link doesn't appear too.
Is there a bug? Is there something in the code that change but that are not in the example pack or in the step from live examples page?
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/15/2008, 8:56 AM |
|
It works in 3 and 4.
Did you see the doc's step 7?
It states you have to copy the event code as it is in the example project.
Also the sample data is for December, 2005
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
gproulx
Posts: 68
|
| Posted: 09/15/2008, 10:56 AM |
|
Yes, i did all the steps, i add the appropriate programming code as shown in the example.
That's why i didn't understand why it doesn't work.
here's the code i add in the BeforeShowDay:
global $Calendar;
global $DefaultDateFormat;
if ($Calendar->IsCurrentMonth) {
$datestr = CCFormatDate($Calendar->CurrentProcessingDate, array("yyyy","mm","dd"));
if (isset($Calendar->Events[$datestr])) {
$Calendar->DayNumber->Visible = false;
$Calendar->DayNumberLink->Visible = true;
// unset($Calendar->Events[$datestr]);
} else {
$Calendar->DayNumber->Visible = true;
$Calendar->DayNumberLink->Visible = false;
}
} else {
$Calendar->DayNumber->Visible = true;
}
if (strlen(CCGetFromGet("s_date",""))) {
$SelDate = CCParseDate(CCGetFromGet("s_date",""), $DefaultDateFormat);
if (CCCompareValues($Calendar->CurrentProcessingDate, $SelDate, ccsDate) == 0) {
$Calendar->CurrentStyle = "class='CalendarSelectedDay'";
}
}
and in the BeforeShow event of the page:
if (!strlen(CCGetFromGet($Component->Calendar->ComponentName . "Date")) && !strlen(CCGetFromGet($Component->Calendar->ComponentName . "Year"))) {
$Component->Calendar->CurrentDate = CCParseDate("2005-12-01", array("yyyy","-","mm","-","dd"));
}
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/15/2008, 1:44 PM |
|
Quote :
and in the BeforeShow event of the page:
if (!strlen(CCGetFromGet($Component->Calendar->ComponentName . "Date")) && !strlen(CCGetFromGet($Component->Calendar->ComponentName . "Year"))) {
$Component->Calendar->CurrentDate = CCParseDate("2005-12-01", array("yyyy","-","mm","-","dd"));
}
Should be Page->AfterInitialize.
BeforeShow of Event Grid has a Hide-Show-Component Action
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
gproulx
Posts: 68
|
| Posted: 09/16/2008, 6:11 AM |
|
Thanks Walter,
it works now
|
 |
 |
|