Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Date selection control

$
0
0
Re: Date selection control
FoxInCloud
Re: Date selection control
Mar. 6, 2013
07:22 am
3QC0FTI1UShow this entire thread in new window
Gratar Image based on email address
From:Michele
To:Michele
It was my error. I called the css file like the js instead of red.css.

Now when i run my app i have a series of errors when loading the first form and when loading the form that contains the buttons that calls the calendar....


Done, i think correctly, but now i can't run my app. Once the main form is opened even if i click on every button nothing happens....


Here is a code sample using a calendar with callback:

* 1/ Download calendar source code * =================================== * http://2007.electronicholas.com/javascripts/calendar_date_select/calendar_date_select.js * http://2007.electronicholas.com/stylesheets/calendar_date_select/red.css * 2/ Add calendar javascript to your application * =================================== * Method 1 (not recommended) : copy and paste js and css into xxx.js and xxx.css * Method 2 (recommended) : * - create in your site : calendar_date_select\calendar_date_select.js and calendar_date_select\red.css * - implement the following methods in xxxServer.prg!xxxProcess class * ------------------------------------------------------------PROTECTEDFUNCTION cawCSSincLPARAMETERS tcCSSadd && [''] Fichier CSS additionnelsRETURNDoDefault('calendar_date_select/red.css')* ------------------------------------------------------------PROTECTEDFUNCTION cawJSincLPARAMETERS tcJSAdd && [''] Fichier JS additionnelsRETURNDoDefault('calendar_date_select/calendar_date_select.js')* 3/ Localize your calendar by adding these instructions to xxx.js * ===================================Date.weekdays = $w("D L M M G V S"); // italianDate.first_day_of_week = 1; // mondayDate.months = $w("Janvier Février Mars Avril Mai Juin Juillet Aoüt Septembre Octobre Novembre Décembre" ); // français * For more information : http://code.google.com/p/calendardateselect/wiki/HowToLocalize * 4/ Implement code in the command button that triggers the calendar * =================================== * 4.1/ Add a hidden field to your HTMLPROCEDURE wcHTMLgenLPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && {en} awHTMLgen instance {fr} instance de awHTMLgen && [.F.] {en} render container's inner HTML {fr} Rendre l'intérieur du conteneur this.wcHTML = Space(0) && {en} keeps default HTML {fr} garde le HTML standardLOCAL lcID lcID = m.toHTMLgen.cObjAddrGet(m.this, 'hidden') m.toHTMLgen.cHTMLadd = Textmerge('<input id="" name="" type="hidden" value="" />') && add this HTML to the rendering * 4.2/ Implement the click to trigger the calendar and send back selected date to the serverPROCEDUREClickLPARAMETERS nButton, nShift, nXcoord, nYcoordIF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)LOCAL lcID, lcScript lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')TEXTTO lcScript TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15 && see other parameters in calendar_date_select.js or http://code.google.com/p/calendardateselect/wiki/Documentation new CalendarDateSelect( $('') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('') /* {en} event or event source object {fr} événement ou son objet source */ , '' /* {en} idof HTML object {fr} id HTML de l'objet détenant la méthode */ , 'your call back method in this VFP object, e.g. "wFormCallBack*" - this method must accept a date parameter' /* {en} method {fr} méthode */ , this.calendar_date_select.date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } ); ENDTEXTRETURN m.lcScriptELSE * You LAN mode codeENDIF


Is there a control compatible with foxincloud that let the user to select a date from a calendar ?




Viewing all articles
Browse latest Browse all 10393

Trending Articles