|
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
|
|
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.aspxThe 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!
|
|
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...
|
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Thanks for the update!
|
|