FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour empty date in xBrowse column
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
empty date in xBrowse column
Posted: Sat Sep 24, 2022 09:25 PM

Hi all,

is there a way to put an empty date into a xBrowse column with nEditType := EDIT_DATE?

I have the case of columns with empty date contents.
If a user triggers the datepicker control by accident or curiousity, there is no way to escape by leaving the column value empty.

Thanks for each hint.
Detlef

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: empty date in xBrowse column
Posted: Sun Sep 25, 2022 07:12 AM
If the original value is empty date, even after dtpicker is activated, pressing Esc restores the original value of empty date.

Also, please add this code:
Code (fw): Select all Collapse
oCol:bKeyDown := { |k,f,br,col| If( k == 32, ( col:VarPut( CTOD( "" ) ), 0 ), nil ) }


If the original value is not an empty date, pressing Space key while on the cell makes it empty.
Regards



G. N. Rao.

Hyderabad, India
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: empty date in xBrowse column
Posted: Sun Sep 25, 2022 07:02 PM

Many thanks, Mr. Rao
both tips are working fine.

Continue the discussion