Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - datepicker blockscount problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

datepicker blockscount problem

 Post Reply Post Reply
Author
Message
tristoon View Drop Down
Newbie
Newbie


Joined: 18 May 2007
Location: France
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote tristoon Quote  Post ReplyReply Direct Link To This Post Topic: datepicker blockscount problem
    Posted: 18 May 2007 at 5:14am
Hi,
I'm trying to count the blocks selected with progress langage.
 
The action is done with the "OCX.selectionChanged" and I have a problem, when I select more than 1 day on the datePicker, the blocksCount is always equals to "1".
 
this is my code:
 
 
DEF VAR DTdateDebut AS DATE NO-UNDO.
DEF VAR DTdateFin AS DATE NO-UNDO.
DEF VAR DTcpt AS INT NO-UNDO.

        chDAtePick:DatePicker:Selection():AllowNoncontinuousSelection = TRUE. /*autorise la séléction multiple*/
        DTcpt = chDAtePick:DatePicker:Selection():BlocksCount. /*nb de jours séléctionnés*/
    
        MESSAGE DTcpt
            VIEW-AS ALERT-BOX INFO BUTTONS OK.

        CASE DTcpt:
            WHEN 1 THEN
            DO:
            DTdateDebut = chdatepick:datepicker:SELECTION(0):datebegin. /*séléction d'un block*/
            chctrlframe:calendarcontrol:dayview:showday(STRING(DTDateDebut),TRUE).
            RUN init-initDemarrage.
            chCtrlFrame:CalendarControl:ViewType = 0. /*vue sur 1 jours*/
            END.

         WHEN 2 OR WHEN 3 OR WHEN 4 OR WHEN 5 OR WHEN 6 THEN
            DO:
            DTDateDebut = chDAtePick:DatePicker:Selection():Blocks(0):DateBegin. /*récupère le premier jour*/
            DTDateFin = chDAtePick:DatePicker:Selection():Blocks(DTcpt - 1):DateEnd. /*récupère le dernier jour séléctionné*/
           
            chctrlframe:calendarcontrol:dayview:showdays(STRING(DTdateDebut),STRING(DTDateFin)).
            RUN init-initDemarrage.
            chCtrlFrame:CalendarControl:ViewType = 1. /*vue sur 5 jour*/
            END.

        WHEN 7 THEN
           DO:
           DTDateDebut = chDAtePick:DatePicker:Selection():Blocks(0):DateBegin. /*récupère le premier jour*/
           DTDateFin = chDAtePick:DatePicker:Selection():Blocks(DTcpt - 1):DateEnd. /*récupère le dernier jour séléctionné*/

           chctrlframe:calendarcontrol:dayview:showdays(STRING(DTdateDebut),STRING(DTDateFin)).
           RUN init-initDemarrage.
           chCtrlFrame:CalendarControl:ViewType = 2. /*vue sur 7 jour*/
           END.

        OTHERWISE
                DO:
                DTDateDebut = chDAtePick:DatePicker:Selection():Blocks(0):DateBegin. /*récupère le premier jour*/
                DTDateFin = chDAtePick:DatePicker:Selection():Blocks(DTcpt - 1):DateEnd. /*récupère le dernier jour séléctionné*/
               
                chctrlframe:calendarcontrol:dayview:showdays(STRING(DTdateDebut),STRING(DTDateFin)).
                RUN init-initDemarrage.
                chCtrlFrame:CalendarControl:ViewType = 3. /*vue sur 1 mois*/
               END.

        END CASE.

 
Can you help me? I don't know where is my problem.
Thanks.
 
Tristan
Back to Top
tristoon View Drop Down
Newbie
Newbie


Joined: 18 May 2007
Location: France
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote tristoon Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2007 at 11:43am
I resolved my problem lonely ! :)
In fact, I tryied to do something so complicated!
just a "attachtoCalendar" masters it fine!
thanks
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.