Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Event Calendar ajax problem
#6

[eluser]MarceloTM[/eluser]
This was really a silly problem, and the solution is very simple.
The problem wasn't with tha ajax or the ci itself, the problem was the way the date was being passed to the sql string to be compared to the data on the DB.

To solve this, in the controller, add these lines:

Code:
if($month < 10):
    if($this->indexOf('0', $month) == -1):
    $month = "0".$month;
    endif;
endif;

while($day_num <= $days_in_month){

    if($day_num < 10):
    $day_num = "0".$day_num;
    endif;

Just two checkings to make sure the day and month have a 0 before the number, if it's lower then 10.
Look for that while loop int the code from the first post and insert those two checks.

Hope it helps.


Messages In This Thread
[SOLVED]Event Calendar ajax problem - by El Forum - 05-27-2010, 07:45 PM
[SOLVED]Event Calendar ajax problem - by El Forum - 05-27-2010, 07:46 PM
[SOLVED]Event Calendar ajax problem - by El Forum - 05-28-2010, 06:54 PM
[SOLVED]Event Calendar ajax problem - by El Forum - 06-04-2010, 03:54 PM
[SOLVED]Event Calendar ajax problem - by El Forum - 06-04-2010, 05:18 PM
[SOLVED]Event Calendar ajax problem - by El Forum - 06-09-2010, 06:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB