Almost Christmas, hoorah.
I've have a form with 4 x UltraDateTimeEditor. These are to record the departure and arrival times for flights. 2 for each so the local and zulu times can set.
If I select a date using the calendar selection from the local arrival date/time as below:
Then click into local departure date/time control it goes into a unwanted edit mode, as below:
The main use case will only require the user to change the time element after selecting the date. The only way out is to click into another field and back again.
Is there anyway to stop the control going into this edit mode?
This is using NetAdvantage 11.1.
Many thanks and Happy Christmas
Nathan
Hello Nathan,
Maybe one possible approach for your scenario could be to use two controls. The first one will be only for the Date and second one will be only for the Time. Please take a look at the attached screenshot. You could achieve this behavior using the property: MaskInput = {LOC}dd/mm/yyyy for the first control and MaskInput = {time} with DropDownButtonDisplayStyle = Never for the second one.
redox said:Is there anyway to stop the control going into this edit mode?
If you want to change the Date and / or Time the control should be in edit mode otherwise you could not be able to change the date and time.
Please let me know if you think that I misunderstood your scenario or if you have any questions.
Regards
Hi Georgi,
Thanks for your response.
The control is currently bound to a single property on a class so ideally I'd like to keep a single control, however I could adapt the class to work with two.
I appreciate it needs to go into edit mode to change the values but I don't need it to do what it's currently doing.
If you look at my example (the last image) when I click into the editor all it displays is the day value, everything else is blanked out and therefore all I can edit is the day. I don't want that to happen. When I click in the editor I expect to see the whole date and time value and then edit the element I want. The first image shows how I want the editor to act when I click into it.
I'd like to know how can I stop it from going into that particular mode shown in the last image.
Kind regards,
Thanks for your response. Please feel free to write us if you have any further questions.
I tried creating a simple project to demonstrate the problem but couldn't recreate it. My project uses CSLA for the business classes that are bound to the control and it's too much hassle to create a sample project with CSLA.
In the CSLA world the date field in the business class is actually a string type not a datetime type. I bind to the text property of the control as it's a string type. However when I bound it to the value property of the control the problem disappeared.
I tried splitting the controls into date and time but got the same problem (when bound to the text property of the control). Using the value field seems to have resolved it so I'll just use that.
Thanks for you help,
redox said:The control is currently bound to a single property on a class so ideally I'd like to keep a single control
Sorry, maybe I didn`t explain well. My idea was to Bind these two controls to the same single propery. By this way the first control will change only the Date of your property and second control will change the Time of the same property. I suppose that you property type is DateTime.
redox said:When I click in the editor I expect to see the whole date and time value and then edit the element I want.
Could you please tell me what is your component version and do you have any installed service release and which one. I try to reproduce your issue using the latest version - 11.1.20111.2050, but without success. If you are able please upload small sample that reproduce your issue. I`ll be glad to research this issue for you.
If you have any questions, feel free to write me