/// <summary>
        /// Initializes a new instance of the <see cref="DatePickerClientEventsBuilder"/> class.
        /// </summary>
        /// <param name="clientEvents">Datepicker client-side events.</param>
        /// <param name="viewContext">The context of the View.</param>
        public DatePickerClientEventsBuilder(DatePickerClientEvents clientEvents, ViewContext viewContext)
        {
            Guard.IsNotNull(clientEvents, "clientEvents");
            Guard.IsNotNull(viewContext, "viewContext");

            this.clientEvents = clientEvents;
            this.viewContext = viewContext;
        }
Ejemplo n.º 2
0
        public DatePickerBase(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            InputHtmlAttributes = new Dictionary <string, object>();

            ClientEvents = new DatePickerClientEvents();
            Effects      = new Effects();

            Value       = null;
            Enabled     = true;
            OpenOnFocus = false;
        }
Ejemplo n.º 3
0
        public DatePickerBase(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            InputHtmlAttributes = new Dictionary<string, object>();

            ClientEvents = new DatePickerClientEvents();
            Effects = new Effects();

            Value = null;
            Enabled = true;
            OpenOnFocus = false;
        }
Ejemplo n.º 4
0
        public DatePicker(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory, IDatePickerHtmlBuilderFactory rendererFactory)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            ScriptFileNames.AddRange(new[] { "telerik.common.js", "telerik.calendar.js", "telerik.datepicker.js" });

            InputHtmlAttributes = new RouteValueDictionary();

            ClientEvents = new DatePickerClientEvents();
            this.Effects = new Effects();

            defaultEffects.Each(el => Effects.Container.Add(el));

            Format = Culture.Current.DateTimeFormat.ShortDatePattern;

            this.rendererFactory = rendererFactory;

            MinDate = defaultMinDate;
            MaxDate = defaultMaxDate;
            Value = null;

            EnableButton = true;
        }