1. #211
    Ext User
    Join Date
    Mar 2008
    Posts
    57
    Vote Rating
    0
    brenda is on a distinguished road

      0  

    Default


    thanks wm003

    Hope to see a new version soon

  2. #212
    Ext User
    Join Date
    Feb 2009
    Posts
    4
    Vote Rating
    0
    RuiDC is on a distinguished road

      0  

    Default setEventDates : regression or why does it not work for me?

    setEventDates : regression or why does it not work for me?


    Quote Originally Posted by aacraig View Post
    It works!

    Thanks very much for your quick response.
    Firstly - great control! keep up the great work - hopefully i'll be able to contribute in due course.

    I've read the posts with aacraig's problems (thanks for the detail, it's been incredibly helpful in helping me understand the control and ExtJS in general), and am running DPPv1.3 and ExtJS 2.2.1 on FF3, but am not seeing the freshly added date render:

    Code:
    <html>
    <head>
        <title>Introduction to DatePickerPlus</title>
        <!-- Include Ext stylesheets here: -->
        <link rel="stylesheet" type="text/css" href="Ext/2.2.1/resources/css/ext-all.css"/>
        <link rel="stylesheet" type="text/css" href="Ext/2.2.1/resources/css/xtheme-gray.css" />
        <link rel="stylesheet" type="text/css" href="Ext/2.2.1/ux/ext.ux.datepickerplus/datepickerplus.css" />
        <!-- Include Ext and app-specific scripts: -->
        <script src="Ext/2.2.1/adapter/ext/ext-base.js"></script>
        <script src="Ext/2.2.1/ext-all-debug.js"></script>
        <script src="Ext/2.2.1/ux/ext.ux.datepickerplus/ext.ux.datepickerplus.js"></script>
    
        <script type="text/javascript">   
            Ext.onReady(
            function()
            {
              Ext.QuickTips.init();
              cal = new Ext.ux.DatePickerPlus
                ({
                id: "dppTest",
                value:            new Date(2009, 1, 19),
                noOfMonth:        1,
                noOfMonthPerRow:  1,
                showWeekNumber:   true,
                markNationalHolidays:   false,
                format: "Y m d",
                listeners:
                    {
                    select: function(){Ext.MessageBox.alert("you selected: " + this.value); }
                    }
                });
                cal.render('myDiv');
            }
            );
    
            function addEvent()
            {
                var dpp = Ext.getCmp('dppTest');
                dpp.setEventDates([]);
                dpp.edArray.push({
                    date: new Date(2009, 1, 25), 
                    text: "the event",
                    cls: "x-datepickerplus-eventdates"            
                });
                if (dpp.rendered) {
                    dpp.update(dpp.activeDate);
                    console.log("# of events: " + dpp.edArray.length);//or dpp.eventDates.length
                } 
            }
        </script>  
    </head>
    <body>
        <div id="myDiv"></div>
        <input type="button" id="btnEvent" value="addEvent" onclick="addEvent();"/>
    </body>
    </html>
    Thanks in advance - as i'm sure someone can point me at where i'm going wrong!

    Regards,
    RuiDC

  3. #213
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    889
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by RuiDC View Post
    Thanks in advance - as i'm sure someone can point me at where i'm going wrong!
    You need to use setEventDates with the complete Set of eventdates right now. I'm working on a better solution like using stores or at least push/pop functions for the upcoming update(s). Meanwhile simply try this:
    Code:
            function addEvent()
            {
                var dpp = Ext.getCmp('dppTest');
                if(!dpp.edArray) {dpp.edArray=[];}
                dpp.setEventDates(
                    dpp.edArray.push({
                        date: new Date(2009, 1, 25), 
                        text: "the event",
                        cls: "x-datepickerplus-eventdates"            
                    })
                );
            }

  4. #214
    Ext User
    Join Date
    Feb 2009
    Posts
    4
    Vote Rating
    0
    RuiDC is on a distinguished road

      0  

    Default


    Thanks for the speedy reply, but it still does not work for me; first log wites 0, second one writes 1, no errors but event date does not render:

    Code:
    function addEvent()
            {
                var dpp = Ext.getCmp('dppTest');
                if(!dpp.edArray) {dpp.edArray=[];}
                /*
                dpp.edArray=[{date: new Date(2009, 1, 25), 
                        text: "the event",
                        cls: "x-datepickerplus-eventdates" }];
                */
                dpp.setEventDates(
                    dpp.edArray.push({
                        date: new Date(2009, 1, 25), 
                        text: "the event",
                        cls: "x-datepickerplus-eventdates"            
                    })
                );
                //console.log("event 0 in array before render: " + dpp.edArray[0].text);
                if (dpp.rendered) {
                    dpp.update(dpp.activeDate);
                    console.log("# of events in array: " + dpp.edArray.length);
                    console.log("# of events in property: " + dpp.eventDates.length);
                } 
            }
    also, tried with direct assignment ie. uncommenting the two comment blocks, this would show the array had the event, but would still not render.

    does this work for you? ie. is there something wrong with my setup?

  5. #215
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    889
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by RuiDC View Post
    Thanks for the speedy reply, but it still does not work for me.
    Some small changes and it works:

    PHP Code:
    function addEvent()
            {
                var 
    dpp Ext.getCmp('dppTest');
                if(!
    dpp.edArray) {dpp.edArray=[];}
                
    dpp.edArray.push({
                    
    date: new Date(2009125), 
                    
    text"the event",
                    
    cls"x-datepickerplus-eventdates"            
                
    });
                
    dpp.setEventDates(dpp.edArray);
            } 

  6. #216
    Ext User
    Join Date
    Feb 2009
    Posts
    4
    Vote Rating
    0
    RuiDC is on a distinguished road

      0  

    Thumbs up setEventDates works with that code

    setEventDates works with that code


    Bingo! that was the missing piece - i see what i did wrong from that.

    Many thanks!
    RuiDC

  7. #217
    Ext User
    Join Date
    Jan 2009
    Location
    La Rochelle, France
    Posts
    3
    Vote Rating
    0
    dubdub is on a distinguished road

      0  

    Default


    Quote Originally Posted by dubdub View Post
    Thank you for your answer. I'm trying the code you wrote, but I have still an issue.
    No problem when I select a month, then a week, then the a day ... But in the other order : I select a day, then I want to select a week, ddp alerts me that I can only select 1 day, and if I click a second time, it selects the week ... (same issue for week or day then month)

    (For information, the third parameter "wasselected" was always "true", i don't know if it could help)
    I asnwer to myself: P

    I finally added two events 'beforeweekclick' and 'beforemonthclick' in the datepickerplus source, and it seems to do what I want ... so ... i'm happy

  8. #218
    Ext User
    Join Date
    Feb 2009
    Posts
    4
    Vote Rating
    0
    RuiDC is on a distinguished road

      0  

    Default Event dates

    Event dates


    Hi,
    I'm interacting with the event dates and am stuck on 2 questions:
    1. if i have an event date on the same date as today, the tooltip saying "Today" takes precedence. Is there any way to change this and have my event tooltip come up instead? I've had a go with firebug here, but am lost in mountains of code.
    2. Is there a better way to not display the nextdays (ie. the days visible from other months) other than overriding the styling of x-date-nextday ?

    One additional question, has anyone submitted a Portuguese localiization file? If not i would like to have a go.

    Regards,
    RuiDC

  9. #219
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    889
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by RuiDC View Post
    1. if i have an event date on the same date as today, the tooltip saying "Today" takes precedence. Is there any way to change this and have my event tooltip come up instead? I've had a go with firebug here, but am lost in mountains of code.
    currently, you will need to modify the code. i will take care of that in the next version.

    Quote Originally Posted by RuiDC View Post
    2. Is there a better way to not display the nextdays (ie. the days visible from other months) other than overriding the styling of x-date-nextday ?
    not yet.there already was a request of being able to do this, so i'll take care of it for the upcoming version ('when it's done')


    Quote Originally Posted by RuiDC View Post
    One additional question, has anyone submitted a Portuguese localiization file? If not i would like to have a go.
    no, i haven't got a portuguese translation yet. I will be glad, if you are going to do this (including portuguese holidays?)

  10. #220
    Ext User
    Join Date
    Apr 2007
    Posts
    10
    Vote Rating
    0
    laluigino is on a distinguished road

      0  

    Default Quick solution to load events for each month

    Quick solution to load events for each month


    Hi wm003!

    First of all: congratulations for this wonderful extension!
    I hope that you'll manage to release the new store function soon!
    In fact, one of my needs is to load events dinamically for each month.

    By now, following your suggestion about the addEvent function, I've written a very simple code that solve this issue, so here's what I've done:

    Code:
    Ext.onReady(function(){
    	Ext.QuickTips.init();
    	var datepicker = new Ext.ux.DatePickerPlus({
    		id: "dppTest",
    		renderTo: 'test',
    		startDay: 1,
    		disableMonthPicker: true,
    		showWeekNumber: false,
    		format: 'd/m/y',
    		listeners: {
                    	select: function() {
    				// some actions here
                    	},
                    	aftermonthchange: function(dppObj) {
    				loadEvents(dppObj.activeDate.getFullYear(), dppObj.activeDate.getMonth());
    			},
    			render: function(dppObj) {
    				loadEvents(dppObj.activeDate.getFullYear(), dppObj.activeDate.getMonth());
    			}
    		}
    	});
    	function addEvent(obj) {
    		var dpp = Ext.getCmp('dppTest');
    		if (!dpp.edArray) {dpp.edArray=[];}
    		dpp.edArray.push(obj);
    		dpp.setEventDates(dpp.edArray);
    	}
    	function loadEvents(year, month) {
    		var dpp = Ext.getCmp('dppTest');
    		dpp.edArray=[];
    		Ext.Ajax.request({
    			url: 'test.php',
    			success: function(r, o) {
    				a = eval(r.responseText);
    				for (var i = 0, n = a.length; i < n; i++) {
    					addEvent(a[i]);
    				}
    			},
    			params: {
    				y: year,
    				m: month
    			}
    		});
    	} 
    });
    Basically, the 'test.php' page returns an array of event objects:

    Code:
    [ { date: new Date(2009, 2, 29), text: "Event of 29/03/2009", cls: "x-datepickerplus-eventdates" }
    , { date: new Date(2009, 2, 3), text: "Event of 03/03/2009", cls: "x-datepickerplus-eventdates" } ]
    that is then evaluated.
    I know that it's not the best way to achieve this, but I thought that it could be a quick solution useful for someone else.

    Thanks again for this extension!

Thread Participants: 111

  1. galdaka (1 Post)
  2. wehtam (5 Posts)
  3. nassaja-rus (1 Post)
  4. mystix (5 Posts)
  5. ludoo (1 Post)
  6. jsakalos (1 Post)
  7. laluigino (2 Posts)
  8. evant (1 Post)
  9. methodz (1 Post)
  10. stevebla (1 Post)
  11. netnoise (1 Post)
  12. KampfCaspar (1 Post)
  13. carstep (2 Posts)
  14. ZooKeeper (1 Post)
  15. nromanel (6 Posts)
  16. Spirit (1 Post)
  17. yuewah (4 Posts)
  18. chemist458 (3 Posts)
  19. jerrybrown5 (3 Posts)
  20. gtomalesky (5 Posts)
  21. jo2008 (1 Post)
  22. aacraig (7 Posts)
  23. stumpy_uk (2 Posts)
  24. hattia (3 Posts)
  25. lpfLoveExt (1 Post)
  26. thoreking (3 Posts)
  27. markusreimers (1 Post)
  28. sigaref (2 Posts)
  29. andreabat (1 Post)
  30. sanjshah (6 Posts)
  31. mask_hot (4 Posts)
  32. dorgan (1 Post)
  33. bornsilly (1 Post)
  34. Zord (3 Posts)
  35. aaronchiang (1 Post)
  36. skbach (5 Posts)
  37. joenilson (2 Posts)
  38. S1-Gezi (1 Post)
  39. pcsernyik (6 Posts)
  40. vizcano (1 Post)
  41. Richie1985 (2 Posts)
  42. radtad (6 Posts)
  43. tagsum (3 Posts)
  44. Nohcs777 (5 Posts)
  45. lavitsky (1 Post)
  46. Hunyi (1 Post)
  47. brenda (3 Posts)
  48. hp (2 Posts)
  49. Dave.Sanders (4 Posts)
  50. DVSDevise (3 Posts)
  51. moegal (3 Posts)
  52. EzBulka (1 Post)
  53. catapl3xis (2 Posts)
  54. rvrdesigns (2 Posts)
  55. rich02818 (5 Posts)
  56. armandoxxx (2 Posts)
  57. WhiteRussian (4 Posts)
  58. lacco (1 Post)
  59. Ronhead (3 Posts)
  60. Urkman (1 Post)
  61. descheret (3 Posts)
  62. dimitrij.zub (1 Post)
  63. hirenb (1 Post)
  64. sasho (7 Posts)
  65. CR_RedFox (1 Post)
  66. joshuabco (1 Post)
  67. apimio (4 Posts)
  68. sirtimbly (2 Posts)
  69. canxss (2 Posts)
  70. SimoAmi (2 Posts)
  71. wemerson.januario (1 Post)
  72. dubdub (3 Posts)
  73. Naokai (5 Posts)
  74. RuiDC (4 Posts)
  75. dkarlsso (1 Post)
  76. slisbin (1 Post)
  77. Chods (2 Posts)
  78. dkroells (3 Posts)
  79. alvaro1728 (1 Post)
  80. sneema (15 Posts)
  81. AdamLShepherd (2 Posts)
  82. bholyoak (2 Posts)
  83. dtex-lab (1 Post)
  84. EZboy (2 Posts)
  85. burbur (1 Post)
  86. strad84 (2 Posts)
  87. radubrehar (4 Posts)
  88. almotasim (2 Posts)
  89. itheart (1 Post)
  90. fmntf (4 Posts)
  91. Allbus (2 Posts)
  92. sprakash (2 Posts)
  93. sansie (3 Posts)
  94. siebe vos (6 Posts)
  95. gkarmadi (1 Post)
  96. fabads (16 Posts)
  97. kskrumpet (4 Posts)
  98. sivanesan (1 Post)
  99. marco81 (1 Post)
  100. Lobo (2 Posts)
  101. benoitrx (1 Post)
  102. JazzMan88 (3 Posts)
  103. Urzzza (1 Post)
  104. josefhaydn (2 Posts)
  105. eja40 (3 Posts)
  106. lukasw44 (1 Post)
  107. thchuong (1 Post)
  108. twhra (1 Post)
  109. ronei (1 Post)
  110. qdano (1 Post)
  111. quintenvk (1 Post)

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi