Calendar event

Rioven

Active Member
Licensed User
Hi,
I have attached a code using calendar function.
Once the date value was selected for the first time it will assign to textbox, delete value of textbox then pick again same date, obviously nothing will happen because value was not changed on 'valuechanged' event. If I use the 'close' event the textbox get automatically the value from calendar even without selecting it, which I don't want to do.
The calendar don't have 'click' event for the value then how can I re-initialized it same as when it first use?

thanks & regards,
rioven
 

Attachments

Rioven

Active Member
Licensed User
Hi Erel,
I have a program that a textbox is on top of calendar control in which user can type-in or select date from calendar.

Once the user use the calendar it will be written on textbox, then if user accidentally erased the date from the textbox he has to take again the same date, therefore the value of calendar remains then the valuechanged event will not work anymore.

:confused:
 
Last edited:

specci48

Well-Known Member
Licensed User
Hi Rioven,

replace
B4X:
Sub Calendar1_ValueChanged
with
B4X:
Sub Calendar1_Close
The second event is fired even the user hasn't changed the date.


specci48
 

Rioven

Active Member
Licensed User
Hi specci48,
My concern on using 'close' event is once the user have already an input on textbox and accidentally pressed the calendar then the date he has already inputed will be overwritten.:(
 

Rioven

Active Member
Licensed User
Hi Erel,
DateParse works on "mm/dd/yyyy" date format only.
I'll try some workaround..
thanks again!
 
Top