CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Calendar example not working

Print topic Send  topic

Author Message
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?
View profile  Send private message
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
View profile  Send private message
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"));
}

View profile  Send private message
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
View profile  Send private message
gproulx


Posts: 68
Posted: 09/16/2008, 6:11 AM

Thanks Walter,

it works now :-) :-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.