Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with PowerBuilder Edit mask

Status
Not open for further replies.

pallab123

IS-IT--Management
Dec 20, 2009
2
US
I am working on PowerBuilder 8.x. There is one start date and end date field with edit mask to accommodate date format. The functionality is when the user enter valid start date, end date to be populated with next years value e.g. start date is 12/12/2010 then end date would be 12/11/2011 in lost focus of start date. Now when i enter valid start date and tab out from start date and enter into end date the it is showing 00/00/0000 in end date field. But when I tab out from end date then it is showing the calculated end date value. Again when I clicked on End date the date value changed to 00/00/0000 from end date value. Is it possible to make the end date as 12/11/2011 instead of 00/00/0000 when I first tab out from start date with valid date value and also when I clicked the end date field where there is valid end date value?
 
How are you setting the end date value? Do you perform an accepttext after it is set?

Matt

"Nature forges everything on the anvil of time
 
We are calculating the end date value in lost focus event of the start date field. end date use to be 1 yr later of start date.
 
First of all:
If you are using a datawindow then the correct place to assign your value would not be the losefocus event but the itemchanged: if dwo.name = 'beginDate' then etc. (assigning the 'endDate'.
(just in case that's what you are doing, since it looks like the value you enter is not entering in the primary buffer somehow ...)

Assuming your not using a datawindow but normal editmasks:
---------------------------------------------------------
I've really always avoided Editmasks since there's nothing but trouble in my opinion with powerbuilder and it's masks in about all versios and prefer to use a "format" so if a user wants to introduce for example "02 12 10" or "02-12-2010" or "2 12 2010", it'll all work.

But since there are also advantages and you are using them, I'll try to give you some idea:

First, assure yourself that you installed the latest patches/EBF's for your pb version.

then something else: try to assign the value some other way, for example using a command button (just to try), or by using "Post". Maybe it might be involved of some mixed-up behaviour of one edit, while losing focus, assigning the new focus while the other (end date editmask) is receiving the focus.

something else: might you have to assign a datetime, instead of a date value?

tried to assing the value with / without the separators "/" used in your editmask?

Hope it helps.



regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top