Autor Beitrag
Christoph Englmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Mo 11.04.05 11:53 
Hallo,

wie kann ich ein Edit-Feld für ne Datumseingabe vor formatieren?

ich möchte, dass der user bei der Datumseingabe keine Punkte/Trennzeichen mehr eingeben muss.
Die Eingabe soll automatisch im Format
DD.MM.YYYY HH:MI vorgegeben werden und der user halt nur noch die Zahlen eingeben müssen (nach Eingabe des Datums soll automatisch zum Monat gesprungen werden)

dank
christoph
Mike19
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 256

Win XP, Vista, Win 7
Delphi 2005, Turbo Delphi
BeitragVerfasst: Mo 11.04.05 11:59 
Hallo,

versuchs mal mit MaskEdit Feld.

Mike
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 11.04.05 12:26 
Geht das nicht auch mit dem TDateTimePicker? Da kann dann auch noch bei Bedarf ein Kalender aufgeklappt werden.
P.S.: Ich hasse TMaskEdit.
Mike19
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 256

Win XP, Vista, Win 7
Delphi 2005, Turbo Delphi
BeitragVerfasst: Mo 11.04.05 12:30 
Hallo,

mit DateTimePicker geht natürlich noch eleganter, da brauchst Du nur das Datum mit der Maus anclicken und dann im Prog übernehmen.

Mike
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Mo 11.04.05 12:42 
womit ihm dann immernoch die zeitangabe fehlen würde.

die maske fürTMaskEdit würde so aussehen: MaskEdit1.EditMask:='!99/99/0000 - !90:00 Uhr;1;_';

weitere infos über die zeichen usw findest du in der delphi hilfe unter dem suchbegriff TEditMask type

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 11.04.05 12:49 
Stimmt. Der DateTimePicker kann ja nur Datum ODER Zeit. Man müsste in dem Fall schon zwei DateTimePicker verwenden, wenn man TMaskEdit vermeiden möchte.
Christoph Englmann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Mo 11.04.05 16:44 
super...danke habs mit TMaskEdit gelöst

christoph