Welcome Guest Search | Active Topics | Sign In | Register

MaskedEdit Long Time Options
oeoeoe
Posted: Thursday, October 14, 2010 3:29:49 AM
Rank: Member
Groups: Member

Joined: 10/13/2010
Posts: 11
Hi

I tried to implement a MaskedEdit Long Time Input Field and got some problems:
- Segment Minute Max Value is 60 but i'm allowed to give in 0-99
- ClientSideOnEvalVar gets not fired (Max. Time 24:00)

Quote:

protected override void OnLoad(EventArgs e)
{
if(!this.Enabled && this.Visible)
this.SetCallBack();

//Hour
EO.Web.MaskedEditSegment SegmentHour = new EO.Web.MaskedEditSegment();
SegmentHour.IsRequired = true;
SegmentHour.MaxValue = 24;
SegmentHour.MinValue = 0;
SegmentHour.SegmentType = EO.Web.MaskedEditSegmentType.Number;
this.Segments.Add(SegmentHour);

//PlaceHolder
EO.Web.MaskedEditSegment SegmentPlaceHolder = new EO.Web.MaskedEditSegment();
SegmentPlaceHolder.Text = ":";
this.Segments.Add(SegmentPlaceHolder);

//Minute
EO.Web.MaskedEditSegment SegmentMinute = new EO.Web.MaskedEditSegment();
SegmentMinute.IsRequired = true;
SegmentMinute.MaxValue = 60;
SegmentMinute.MinValue = 0;
SegmentMinute.SegmentType = EO.Web.MaskedEditSegmentType.Number;
this.Segments.Add(SegmentMinute);

this.PromptChar = '0';
this.ClientSideOnEvalVar = "checkTime";

base.OnLoad(e);
}



Quote:

function checkTime(control, varName, varFormat)
{
alert('test');
}


Thanks in advance for help
eo_support
Posted: Thursday, October 14, 2010 9:13:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The best way for you to enter time is to use the DatePicker control. That control has built-in support for time value. See here for a working example:

http://demo.essentialobjects.com/Demos/Calendar/Features/Date%20and%20Time%20Picker/Demo.aspx

The above sample includes both date and time. However you can change the DatePicker's PickerFormat to remove the date part. You can also set PopupImageVisible to false to hide the drop down button.

ClientSideOnEvalVar is something very different. It is used for custom client template.

Thanks!
oeoeoe
Posted: Monday, October 25, 2010 5:53:09 AM
Rank: Member
Groups: Member

Joined: 10/13/2010
Posts: 11
Hey

Thx, I did'nt see this feature....

Now i get the problem:
I'm showing the date and Time in 2 different DatePicker's
if i set PopupImageVisible to false IE sets width of input box to 100% (before 64px) and IE doesn't like that at all...
eo_support
Posted: Monday, October 25, 2010 9:25:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to set PopupImageVisible to true and then set the PickerImageUrl to "Blank" and see if that works for you.

Thanks!
oeoeoe
Posted: Tuesday, October 26, 2010 3:53:48 AM
Rank: Member
Groups: Member

Joined: 10/13/2010
Posts: 11
Now Datepicker formats everything well, IE still shows something different (maybe because of input size is different)
For me it's ok like this.
Thank you very much
eo_support
Posted: Tuesday, October 26, 2010 8:36:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Thanks for the update!


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.