Fill calendar events with database, dont show events with day less than 10 [SOLVED] |
[eluser]Asinox[/eluser]
Hi, im try to fill the calendar with events from database, the calendar is "fine", is working, but just with day not less than 10, for example, if i have events in this date (2009-03-25) the calendar is fine, excellent , but if the events are in date like (2009-03-01) don't show link's in the months....just when the day is not less than 10 how ill fix that guys? Thanks PD: i was looking that post http://ellislab.com/forums/viewthread/106361/ and i try to make in my way my code Code: $this_month_events = array(); Thanks for see
[eluser]sophistry[/eluser]
un consejo... print_r($fecha); it sounds like something is going wrong with explode().
[eluser]Asinox[/eluser]
thanks for replay. not the explode is fine the problem is that if the date from database is something like 2009-10-04, the day have a 0 and this is the problem, the example in the user_guide is without 0 if the number is less than 10. Code: $this->load->library('calendar'); in the example the day 3 and 7 are without 0, so i think the problem is there. thanks Sorry with my English.
[eluser]Asinox[/eluser]
yes, sure!, like a said, the calendar working in "day" that don't start with 0.and my day start with 0 bcz mysql in type DATE insert in the format YYYY-mm-dd, if a send a 2009-12-3 mysql add a 0 in the day "3" bcz the DATE FORMAT is YYYY-mm-dd. but any way im making a function for delete the 0. Thanks
[eluser]Asinox[/eluser]
now my calendar is fine working with data from database CODE HERE: if someone need it Code: $days_in_month = date('t'); //ie 28 |
Welcome Guest, Not a member yet? Register Sign In |