Пример #1
0
        private WebControl getIconButton()
        {
            var parent = new EwfLabel {
                CssClass = "fa-stack datetimepickerIcon"
            };
            var iconCal  = new FontAwesomeIcon("fa-calendar-o", "fa-stack-2x");
            var iconTime = new FontAwesomeIcon("fa-clock-o", "fa-stack-1x");

            iconTime.Style.Add(HtmlTextWriterStyle.Position, "relative");
            iconTime.Style.Add(HtmlTextWriterStyle.Top, ".20em");
            parent.AddControlsReturnThis(iconCal, iconTime);

            var style = new CustomActionControlStyle(control => control.AddControlsReturnThis(parent));

            return(new CustomButton(() => "$( '#{0}' ).datetimepicker( 'show' )".FormatWith(textBox.TextBoxClientId))
            {
                ActionControlStyle = style,
                CssClass = "icon"
            });
        }