/mojoPortal.Web.Controls/DatePicker/jsCalendarDatePickerAdapter.cs
C# | 181 lines | 131 code | 34 blank | 16 comment | 0 complexity | c6fb8427791007a9e976e480be8308df MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause, CPL-1.0, CC-BY-SA-3.0, GPL-2.0
- // Author: Joe Audette
- // Created: 2007-11-07
- // Last Modified: 2011-08-15
- //
- // Licensed under the terms of the GNU Lesser General Public License:
- // http://www.opensource.org/licenses/lgpl-license.php
- //
- // You must not remove this notice, or any other, from this software.
- //
-
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using mojoPortal.Web.Controls;
-
-
- namespace mojoPortal.Web.Controls.DatePicker
- {
-
- public class jsCalendarDatePickerAdapter : IDatePicker
- {
- private jsCalendarDatePicker control;
-
- #region Constructors
-
- public jsCalendarDatePickerAdapter()
- {
- InitializeAdapter();
- }
-
- #endregion
-
-
-
-
-
-
- public string ControlID
- {
- get
- {
- return control.ID;
- }
- set
- {
- control.ID = value;
- }
- }
-
- public string Text
- {
- get
- {
- return control.Text;
- }
- set
- {
- control.Text = value;
- }
- }
-
- public string ButtonImageUrl
- {
- get
- {
-
- return control.ButtonImageUrl;
- }
- set
- {
-
- control.ButtonImageUrl = value;
- }
- }
-
- public Unit Width
- {
- get
- {
- return control.Width;
- }
- set
- {
- control.Width = value;
- }
- }
-
- public bool ShowTime
- {
- get
- {
- return control.ShowTime;
- }
- set
- {
- control.ShowTime = value;
- }
- }
-
- public string ClockHours
- {
- get
- {
- return control.ClockHours;
- }
- set
- {
- control.ClockHours = value;
- }
- }
-
- // *** added by ghalib ghniem Aug-14-2011 ChangeMonth: bool ,ChangeYear: bool, YearRange: string
- // notes by Joe Audette
- // these are added only becuase we must support all properties of IDataPicker
- // but these properties are not used in this datepicker, they are used in the jQueryUI datepicker
- private bool showMonthList = false;
- public bool ShowMonthList
- {
- get { return showMonthList; }
- set { showMonthList = value; }
- }
-
- private bool showYearList = false;
- public bool ShowYearList
- {
- get { return showYearList; }
- set { showYearList = value; }
- }
-
- private string yearRange = string.Empty;
- public string YearRange
- {
- get { return yearRange; }
- set { yearRange = value; }
- }
-
- // not really implemented in this datepicker but needed to support chanfges in IDatePicker so we can use more of jQuery Datepicker features
- private string calculateWeek = string.Empty;
- public string CalculateWeek
- {
- get { return calculateWeek; }
- set { calculateWeek = value; }
- }
-
- // not really implemented in this datepicker but needed to support chanfges in IDatePicker so we can use more of jQuery Datepicker features
- private int firstDay = -1; //-1 mean use default don't set it by script
- public int FirstDay
- {
- get { return firstDay; }
- set { firstDay = value; }
- }
-
- // not really implemented in this datepicker but needed to support chanfges in IDatePicker so we can use more of jQuery Datepicker features
- private bool showWeek = false;
- public bool ShowWeek
- {
- get { return showWeek; }
- set { showWeek = value; }
- }
-
-
- private void InitializeAdapter()
- {
- control = new jsCalendarDatePicker();
-
- }
-
- #region Public Methods
-
- public Control GetControl()
- {
- return control;
- }
-
-
-
- #endregion
- }
- }