Ejemplo n.º 1
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            fromTime = new TimePicker { ID = "from" + ID, Enabled = Enabled };
            Controls.Add(fromTime);

            fromTimeValidator = new RequiredFieldValidator
            {
                ID = "rfv" + fromTime.ID,
                ControlToValidate = fromTime.ID,
                Display = ValidatorDisplay.Dynamic,
                Text = "*",
                ErrorMessage = StartTitle + " is required",
                Enabled = false
            };
            Controls.Add(fromTimeValidator);

            between = new Label();
            Controls.Add(between);

            toTime = new TimePicker { ID = "to" + ID, Enabled = Enabled };
            Controls.Add(toTime);

            fromTime.TextChanged += TextChanged;
            toTime.TextChanged += TextChanged;
        }
Ejemplo n.º 2
0
 protected override Control AddEditor(Control container)
 {
     TimePicker range = new TimePicker { ID = Name };
     container.Controls.Add(range);
     return range;
 }