How to accept Birthday Input with DOB as Optional
Moderator: Rathinagiri
How to accept Birthday Input with DOB as Optional
Dear Friends,
I'm stuck with an issue in my Members' Master Form- accepting data against Birthday & DOB.
In the manual form, everybody doesn't wishes to fill the year and just puts in Day & Month's data. And a few supplies the complete Date Of Birth. I've to incorporate both kind of data from a single input and the data should be stored in a single date field of a dbf. And it also should take care during the Modify mode and reports related to birthday & dob/ages.
I would love to have a few suggestions .......... yes I'll use DatePicker control. In the meantime let me also think ...
Regards,
Swapan
I'm stuck with an issue in my Members' Master Form- accepting data against Birthday & DOB.
In the manual form, everybody doesn't wishes to fill the year and just puts in Day & Month's data. And a few supplies the complete Date Of Birth. I've to incorporate both kind of data from a single input and the data should be stored in a single date field of a dbf. And it also should take care during the Modify mode and reports related to birthday & dob/ages.
I would love to have a few suggestions .......... yes I'll use DatePicker control. In the meantime let me also think ...
Regards,
Swapan
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to accept Birthday Input with DOB as Optional
You can use 'ShowNone' property also at the definition time.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: How to accept Birthday Input with DOB as Optional
Hello Swapan,
Rathi is correct, use his tips.
IMOH you can also use 3 textboxes for this - Day, Month, Year. And if a member has provided 3 valid entries then only you can calculate and store DOB in table, otherwise store them in 3 fields or one text field in "yyyymmdd" format.
You may also use one textbox with format "99/99/9999" (But I have to check, whether this format is allowed or not).
For "fast" data-entry I prefer textbox than date picker.
With best regards.
Sudip
Rathi is correct, use his tips.
IMOH you can also use 3 textboxes for this - Day, Month, Year. And if a member has provided 3 valid entries then only you can calculate and store DOB in table, otherwise store them in 3 fields or one text field in "yyyymmdd" format.
You may also use one textbox with format "99/99/9999" (But I have to check, whether this format is allowed or not).
For "fast" data-entry I prefer textbox than date picker.
With best regards.
Sudip
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to accept Birthday Input with DOB as Optional
I agree with you Sudip. I would also prefer text box approach
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: How to accept Birthday Input with DOB as Optional
Thx Sudip for your inputs. I've also thought in this line ......
Regards
Swapan
But then I've to write one function to check if the entered data is a correct valid date or not. In our old Clipper its so easy to take input for a date memory variable with date validation in-built. Can it be same here? Otherwise, I assume lot of things to be done for a proper date input in a textbox.sudip wrote: You may also use one textbox with format "99/99/9999" (But I have to check, whether this format is allowed or not).
Sudip
Regards
Swapan
Re: How to accept Birthday Input with DOB as Optional
Didn't get it!rathinagiri wrote:You can use 'ShowNone' property also at the definition time.
I've to provide the input control - it will depend upon the user/data whether to bypass the input (no data), partial entry (only day & month) or complete entry (dd / mm /yyyy).
Re: How to accept Birthday Input with DOB as Optional
At present I've decided to keep only 1 field for DOB in the database, and if the Year is missing in the manual data, get it filled with year 1900 in the system.
To implement a textbox for Date input, I did the following thing:
@ 426 , 740 LABEL lblDOBFormat ;
VALUE '(DD/MM/YYYY)' ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
WIDTH 100
@ 426,625 TEXTBOX txtDt_Of_Birth ;
WIDTH 80 ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
VALUE '01-01-1900' ;
INPUTMASK '99-99-9999' ;
ON GOTFOCUS frmMember.lblDt_Of_Birth.FontBold := .T. ;
ON LOSTFOCUS CheckDOB()
With regards,
Swapan
To implement a textbox for Date input, I did the following thing:
@ 426 , 740 LABEL lblDOBFormat ;
VALUE '(DD/MM/YYYY)' ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
WIDTH 100
@ 426,625 TEXTBOX txtDt_Of_Birth ;
WIDTH 80 ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
VALUE '01-01-1900' ;
INPUTMASK '99-99-9999' ;
ON GOTFOCUS frmMember.lblDt_Of_Birth.FontBold := .T. ;
ON LOSTFOCUS CheckDOB()
With regards,
Swapan
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to accept Birthday Input with DOB as Optional
Why not put DATE option and remove inputmask like below?
@ 426,625 TEXTBOX txtDt_Of_Birth ;
WIDTH 80 ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
VALUE ctod('01-01-1900') ;
date ;
ON GOTFOCUS frmMember.lblDt_Of_Birth.FontBold := .T. ;
ON LOSTFOCUS CheckDOB()
@ 426,625 TEXTBOX txtDt_Of_Birth ;
WIDTH 80 ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
VALUE ctod('01-01-1900') ;
date ;
ON GOTFOCUS frmMember.lblDt_Of_Birth.FontBold := .T. ;
ON LOSTFOCUS CheckDOB()
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: How to accept Birthday Input with DOB as Optional
Thanks!rathinagiri wrote:Why not put DATE option and remove inputmask like below?
@ 426,625 TEXTBOX txtDt_Of_Birth ;
WIDTH 80 ;
TOOLTIP "To undislose Year from Date of Birth - supply 1900 in Year field" ;
VALUE ctod('01-01-1900') ;
date ;
ON GOTFOCUS frmMember.lblDt_Of_Birth.FontBold := .T. ;
ON LOSTFOCUS CheckDOB()