Welcome Guest Search | Active Topics | Sign In | Register

MaskedEdit Options
Dexter
Posted: Monday, August 4, 2008 6:23:30 AM
Rank: Newbie
Groups: Member

Joined: 7/29/2008
Posts: 9
Please, can anybody help me to produce a maskedEdit with following output:

"23:59"

with 2 segments: for hours and minutes.

I want if user put only one character say: "1" in the first segment, then it automatically change to "01"

so instead of having:

"1 :20" I want to be changed to "01:20"

Is this possible?
eo_support
Posted: Monday, August 4, 2008 6:56:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Dexter
Posted: Monday, August 4, 2008 7:09:40 AM
Rank: Newbie
Groups: Member

Joined: 7/29/2008
Posts: 9
No, its not.

I don't want to use a DatePicker for a string bindable field. The question was can I have a leading zero in that segments or not?!

I don't understand why you turn the question to a different direction!?

Our logic may be changed so we pick time between 08:00 to 17:00 - would it be possible then to restrict DatePicker to these values?

(These are 2 qestions - and I would be glad If I'm answered to both).

Dexter
eo_support
Posted: Monday, August 4, 2008 7:48:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Dexter wrote:
I don't want to use a DatePicker for a string bindable field. The question was can I have a leading zero in that segments or not?!

No. The MaskedEdit never automatically fills 0, either at the beginning or at the end. It validates the input against a mask, if it matches, accept it, otherwise rejects.


Dexter wrote:
I don't understand why you turn the question to a different direction!?

We are not turning the question. We are giving you a workable solution. We apologize if the solution is not what you expected, but that's what's available to our best knowledge.


Dexter wrote:
Our logic may be changed so we pick time between 08:00 to 17:00 - would it be possible then to restrict DatePicker to these values?

We are not aware of any way to do that on DatePicker. You can do that on the MaskedEdit with two Number segments (which allows you to set Max/Min value) but as you have already noticed, you won't get the zeros automatically filled in. Regardless which control you use, you can always use some JavaScript to automatically corrects the value when the textbox loses focus. This has been recently discussed in this post:

http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1888

The post was for the DatePicker control. However it works with MaskedEdit control the same way.

Hope this answers your question.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.