SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 35 of 35
  1. #26
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks pmw57,

    eventRender: function(event, eventElement){
    if (event.imageAfterTime)
    {
    eventElement.find('span.fc-event-time').after($(event.imageAfterTime));
    }
    if (event.imageAfterTitle)
    {
    eventElement.find('span.fc-event-title').after($(event.imageAfterTitle));
    }
    }
    });
    did the trick.

    I must say your method to get us thinking is rather good as well!

  2. #27
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, new issue, I'm trying to convert my time to 24h format.

    http://arshaw.com/fullcalendar/docs/text/timeFormat/

    And this is how my code looks:

    Code JavaScript:
    $(document).ready(function() {
     
    		var date = new Date();
    		var d = date.getDate();
    		var m = date.getMonth();
    		var y = date.getFullYear();
     
     
    		$('#calendar').fullCalendar({
    			editable: true,
    			events: [
    		 			{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' RSA-MEX ',
    					start:   '2010-06-11T14:30:00',
    					allDay: false,
    					},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' URU-FRA ',
    					start:   '2010-06-11T19:30:00',
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:'KOR-GRE',
    					start:   '2010-06-12T12:30:00',
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' ARG-NGA ',
    					start: new Date(y, m, 12, 15, 00),
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' ENG-USA ',
    					start: new Date(y, m, 12, 19, 30),
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:'ALG-SVN',
    					start: new Date(y, m, 13, 12, 30),
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' SRB-GHA ',
    					start: new Date(y, m, 13, 15, 00),
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:' GER-AUS ',
    					start: new Date(y, m, 13, 19, 30),
    					allDay: false
    				},
    					{
    					imageAfterTime: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/ad.png' style='width:19px;height:13px'/>"),
    					title:'NED-DEN',
    					start: new Date(y, m, 14, 12, 30),
    					allDay: false
    				},
    					{
    					title:' JPN vs CMR',
    					start: new Date(y, m, 14, 15, 00),
    					allDay: false
    				},
    					{
    					title:' ITA vs PAR',
    					start: new Date(y, m, 14, 19, 30),
    					allDay: false
    				},
    					{
    					title:' NZL vs SVK',
    					start: new Date(y, m, 15, 12, 30),
    					allDay: false
    				},
    				    {
    					className:'pt',
    					title:' CIV vs POR',
    					start: new Date(y, m, 15, 15, 00),
    					allDay: false
    				},
    				    {
    					title:' BRA vs PRK',
    					start: new Date(y, m, 15, 19, 30),
    					allDay: false
    				},
    				    {
    					title:' HON vs CHI',
    					start: new Date(y, m, 16, 12, 30),
    					allDay: false
    				},
    				    {
    					title:' ESP vs SUI',
    					start: new Date(y, m, 16, 15, 90),
    					allDay: false
    				},
    				    {
    					title:' RSA vs URU',
    					start: new Date(y, m, 16, 19, 30),
    					allDay: false
    				},
    						 {
    					title:' ARG vs KOR',
    					start: new Date(y, m, 17, 12, 30),
    					allDay: false
    				},
    					 {
    					title:' GRE vs NGA',
    					start: new Date(y, m, 17, 15, 00),
    					allDay: false
    				},
    				 {
    					title:' FRA vs MEX',
    					start: new Date(y, m, 17, 19, 30),
    					allDay: false
    				},
    				 {
    					title:' GER vs SRB',
    					start: new Date(y, m, 18, 12, 30),
    					allDay: false
    				},
    				 {
    					title:' SVN vs USA',
    					start: new Date(y, m, 18, 15, 00),
    					allDay: false
    				},
    					 {
    					title:' ENG vs ALG',
    					start: new Date(y, m, 18, 19, 30),
    					allDay: false
    				},
    				{
    					title:' NED vs JPN',
    					start: new Date(y, m, 19, 12, 30),
    					allDay: false
    				},
    					{
    					title:' GHA vs AUS',
    					start: new Date(y, m, 19, 15, 00),
    					allDay: false
    				},
    					{
    					title:' CMR vs DEN',
    					start: new Date(y, m, 19, 19, 30),
    					allDay: false
    				},
    					{
    					title:' SVK vs PAR',
    					start: new Date(y, m, 20, 12, 30),
    					allDay: false
    				},
    					{
    					title:' ITA vs NZL',
    					start: new Date(y, m, 20, 15, 00),
    					allDay: false
    				},
    					{
    					title:' BRA vs CIV',
    					start: new Date(y, m, 20, 19, 30),
    					allDay: false
    				},
    					{
    					className:'pt',
    					title:' POR vs PRK',
    					start: new Date(y, m, 21, 12, 30),
    					allDay: false
    				},
    					{
    					title:' CHI vs SUI',
    					start: new Date(y, m, 21, 15, 00),
    					allDay: false
    				},
    					{
    					title:' ESP vs HON',
    					start: new Date(y, m, 21, 19, 30),
    					allDay: false
    				},
    					{
    					title:' MEX vs URU',
    					start: new Date(y, m, 22, 15, 00),
    					allDay: false
    				},
    					{
    					title:' FRA vs RSA',
    					start: new Date(y, m, 22, 15, 00),
    					allDay: false
    				},
    					{
    					title:' GRE vs ARG',
    					start: new Date(y, m, 22, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' NGA vs KOR',
    					start: new Date(y, m, 22, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' SVN vs ENG',
    					start: new Date(y, m, 23, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' USA vs ALG',
    					start: new Date(y, m, 23, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' AUS vs SRB',
    					start: new Date(y, m, 23, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' GHA vs GER',
    					start: new Date(y, m, 23, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' PAR vs NZL',
    					start: new Date(y, m, 24, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' SVK vs ITA',
    					start: new Date(y, m, 24, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' DEN vs JAP',
    					start: new Date(y, m, 24, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' CMR vs NED',
    					start: new Date(y, m, 24, 19, 30),
    					allDay: false
    				},
    				{
    					className:'pt',
    					title: ' POR vs BRA',
    					start: new Date(y, m, 25, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' PRK vs CIV',
    					start: new Date(y, m, 25, 15, 00),
    					allDay: false
    				},
    				{
    					title: ' SUI vs HON',
    					start: new Date(y, m, 25, 19, 30),
    					allDay: false
    				},
    				{
    					title: ' CHI vs ESP',
    					start: new Date(y, m, 25, 19, 30),
    					allDay: false
    				}
    			],
        		timeFormat: 'H(:mm)' // uppercase H for 24-hour clock
    });
    			eventRender: function(event, eventElement){
                       if (event.imageAfterTime) 
    					{
        					eventElement.find('span.fc-event-time').after($(event.imageAfterTime));
    					}   
    					 if (event.imageAfterTitle) 
    					{
        					eventElement.find('span.fc-event-title').after($(event.imageAfterTitle));
    					}   
                    }
     
    		});

    As you can see in the end, I have put up that timeFormat setting, and used the syntax in the first event:

    Code JavaScript:
    start:   '2010-06-11T14:30:00',

    But i end up with no calendar at all.

  3. #28
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,676
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Where is a test page the demonstrates the problem?

    In the mean time, simplify. Reduce the events to a single event and get things working first with only that. Then add other pieces on until you come across what is causing the issue.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #29
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://cudamine.com/icame/sitemundial/calendar.html

    I did try removing all the events but one, but it seems it might be my placing of the timeFormat setting.

  5. #30
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,676
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Check the braces and parenthesis, for it is there you will find the issue.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #31
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've been trying since my last message... no dice, losing my mind over here, tried so manu sequences, looked at it logically...

    this is what makes sense to me:

    timeFormat: 'Hmm)' // uppercase H for 24-hour clock
    });
    eventRender: function(event, eventElement){
    if (event.imageAfterTime)
    {
    eventElement.find('span.fc-event-time').after($(event.imageAfterTime));
    }
    if (event.imageAfterTitle)
    {
    eventElement.find('span.fc-event-title').after($(event.imageAfterTitle));
    }
    }
    });
    });
    Last edited by paul_wilkins; Jun 20, 2010 at 13:55.

  7. #32
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,676
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Check out the syntax diagrams for JavaScript.

    This is the syntax that you're dealing with:



    I think that you do have what it takes to figure this out.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  8. #33
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, I did figure it out yesterday

    If you check my last link, you will see that the flags are now properly being displayed.

    Thanks for the help!

  9. #34
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello again, I'm one more time having issues with the calendar, and this time I really need some quick help, as I need to present this in a few days.

    Anyway:
    i want to implement the following:
    http://arshaw.com/fullcalendar/docs/...date/gotoDate/

    This is what I tried:
    Code JavaScript:
    <script type='text/javascript'> 
     
    	$(document).ready(function() {
     
    		var date = new Date();
    		var d = date.getDate();
    		var m = date.getMonth();
    		var y = date.getFullYear();
     
    		$('#calendar').fullCalendar('gotoDate', 2010, 7);
    		$('#calendar').fullCalendar({
    			editable: true,
    			events: [
    		 			{
    					imageAfterTime: $("<img src = 'images/flags/za.png' style='width:19px;height:13px'/>"),
    					imageAfterTitle: $("<img src = 'images/flags/mx.png' style='width:19px;height:13px'/>"),
    					title:' RSA-MEX ',
    					start:   '2010-06-11T14:30:00',
    					allDay: false,
    					},

    The URL of my calendar is:
    http://cudamine.com/icame/sitemundial/calendar.html

    (should you need to see more code)

    This of course, isn't working.

    Can anyone help me call this 'gotoDate' thing? I'm terrible at this...

  10. #35
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,676
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    The line of code that you use for gotoDate needs to be moved so that it occurs after the code that creates the calendar.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •