Page 2 of 2
Re: Cual es la sintaxis para el DATEPICKER
Posted: Wed Aug 21, 2013 2:56 am
by andyglezl
Hola gabriel
Para lo que explicas, seria mas o menos así...
en vez de DATEPICKER sería MONTHCALENDAR
Code: Select all
FUNCTION MAIN()
DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 200 ;
TITLE 'DatePicker Test' ;
MAIN
@ 10,10 MONTHCALENDAR MC_1 Value Date() ;
WEEKNUMBERS FONT "Arial" SIZE 9 ON CHANGE Busca( dtoc(Win_1.MC_1.Value) )
@ 90,10 GRID MiGrid WIDTH 326 HEIGHT 415 ;
HEADERS {"Hora","Empresa","Nombre","Registro"} ;
WIDTHS {50,100,100,50} FONT "Arial" SIZE 9
END WINDOW
ACTIVATE WINDOW Win_1
RETURN( Nil )
FUNCTION Busca( cFecha )
Use MiDB ALIAS DB
DBSeek( cFecha, .f. )
Do while ( tu condicion )
...
...
Win_1.MiGrid.AddItem( { HORA, EMPRESA, NOMBRE, REGISTRO } )
...
ENDDO
RETURN( Nil )
Re: Cual es la sintaxis para el DATEPICKER
Posted: Sun Oct 13, 2013 9:54 pm
by tonton2
Bonsoir a tous , et bien sûr merci a toute l'équipe de sa précieuse aide.
Voila je n'arrive pas a trouver pourquoi la date ne s'affiche pas dans le MSGINFO.
Good evening everybody, and of course thank you to all the team for their valuable assistance.
That I can not seem to find why the date is not displayed in the msginfo.
Good continuation
Code: Select all
#include "hmg.ch"
Function Main
DEFINE WINDOW affichedates ;
AT 0,0 ;
WIDTH 800 ;
HEIGHT 650 ;
TITLE "Recherche Par premiere implementation dns la grille" ;
MAIN
DEFINE BUTTON SeleCredit
ROW 520
COL 20
WIDTH 170
CAPTION 'Afficher les dates...' // 'Click after selecting an item'
ACTION AfficheDate()
END BUTTON
@ 522,260 LABEL lbl_1 ;
WIDTH 20 ;
HEIGHT 25 ;
VALUE "Du " ;
RIGHTALIGN
@ 520,300 DATEPICKER Date_1 VALUE CTOD("01/05/2012")
@ 522,430 LABEL lbl_2 ;
WIDTH 20 ;
HEIGHT 25 ;
VALUE " Au" ;
RIGHTALIGN
@ 520,460 DATEPICKER Date_2 VALUE date() // CTOD("01/07/2013")
END WINDOW
END WINDOW
affichedates.CENTER
affichedates.ACTIVATE
// CENTER WINDOW Form_1
Return
Function AfficheDate()
msginfo (ctod('affichedates.DATE_1.VALUE'))
msginfo (ctod('affichedates.DATE_2.VALUE'))
Return nil
Re: Cual es la sintaxis para el DATEPICKER
Posted: Sun Oct 13, 2013 11:32 pm
by esgici
tonton2 wrote:
Voila je n'arrive pas a trouver pourquoi la date ne s'affiche pas dans le MSGINFO.
Parce que vous n'avez pas besoin de CTOD() ( Valeur de contrôle de datepicker est déjà de type D )
Code: Select all
msginfo ( affichedates.DATE_1.VALUE )
msginfo ( affichedates.DATE_2.VALUE )
Maassalam
Re: Cual es la sintaxis para el DATEPICKER
Posted: Mon Oct 14, 2013 7:33 am
by tonton2
Good morning my friend,
Merci beaucoup pour la rapidite de la reponse
Thank you so much for the rapidity of the response
Re: Cual es la sintaxis para el DATEPICKER
Posted: Mon Oct 14, 2013 8:21 am
by esgici
Pas de qoi mon ami
Viva HMG

Re: Cual es la sintaxis para el DATEPICKER
Posted: Mon Oct 14, 2013 5:43 pm
by mustafa
Hola gabrieloq
Te dejo un sample que en su dia formaba parte de
un programa que publique:
viewtopic.php?f=9&t=1059" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
Haber si te puede servir, te dejo los samples
en ingles y español.
sample_En.prg y sample_Es.prg
tienes que compilar con HMG 3.1.5
*------------------------------------------------*
Hello gabrieloq
I leave a sample that once was part of
a program to publis:
viewtopic.php?f=9&t=1059" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
Have if you can help, I'll let the samples
in English and Spanish
sample_En.prg and sample_Es.prg
HMG have to compile with 3.1.5
Mustafa
Some details on DATEPICKER control
Posted: Mon Oct 14, 2013 9:57 pm
by esgici
Hi All
Made some little modifications on DatePicker control demo, for emphasize some handy details of this control.

- Some details on DatePicker control
- DatePicker2.jpg (64.46 KiB) Viewed 3469 times
Code: Select all
/*
*
* HMG - Harbour Win32 GUI library Demo
*
* Copyright 2002 Roberto Lopez <mail.box.hmg@gmail.com>
* http://www.hmgforum.com//
*
* Sligtly modified version of DatePicker demo.
*
*/
#include "hmg.ch"
Function Main
SET DATE GERM
SET CENT ON
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 600 HEIGHT 500 ;
TITLE "HMG DatePicker Demo" ;
MAIN ;
FONT "Arial" SIZE 10
ON KEY ESCAPE ACTION ThisWindow.Release
@ 10,10 LABEL Label_1 VALUE "Simple"
@ 30,10 DATEPICKER Date_1 ;
VALUE DATE() ;
TOOLTIP "DatePicker Control";
ON CHANGE UpdaSBar()
@ 10,410 LABEL Label_2 WIDTH 200 VALUE "ShowNone RightAlign"
@ 30,410 DATEPICKER Date_2 ;
VALUE DATE() ;
TOOLTIP "DatePicker Control ShowNone RightAlign" ;
SHOWNONE ;
RIGHTALIGN;
ON CHANGE UpdaSBar()
@ 230,10 LABEL Label_3 WIDTH 200 VALUE "UpDown"
@ 250,10 DATEPICKER Date_3 ;
VALUE DATE() ;
TOOLTIP "DatePicker Control UpDown" ;
UPDOWN;
ON CHANGE UpdaSBar()
@ 230,410 LABEL Label_4 WIDTH 200 VALUE "ShowNone UpDown"
@ 250,410 DATEPICKER Date_4 ;
VALUE DATE() ;
TOOLTIP "DatePicker Control ShowNone UpDown" ;
SHOWNONE ;
UPDOWN;
ON CHANGE UpdaSBar()
DEFINE STATUSBAR FONT 'Verdana' SIZE 8
STATUSITEM ""
END STATUSBAR
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil
PROCEDURE UpdaSBar()
Form_1.StatusBar.Item(1) := This.Name + " : " + DTOC( This.Value )
RETURN // UpdaSBar()
Happy HMG'ing
