Пример #1
0
        private DatePicker_DayButton GetDayTemplateForDate(DateTime date)
        {
            DatePicker_DayButton dayTemplate = null;

            if (SelectedDate.HasValue && date.Equals(SelectedDate.Date))
            {
                dayTemplate = Ref_Template_Day_SelectedDay;
            }
            else if (date.Equals(DateTime.Today))
            {
                dayTemplate = Ref_Template_Day_Today;
            }
            else if (date.Month == VisibleDate.Date.Month)
            {
                dayTemplate = Ref_Template_Day_CurrentMonth;
            }
            else
            {
                dayTemplate = Ref_Template_Day_OtherMonths;
            }

            return(dayTemplate);
        }
 public DatePicker_DayButton_Pool_List_Item(DatePicker_DayButton template)
 {
     button            = GameObject.Instantiate(template);
     button.IsTemplate = false;
 }
 public void SetTemplate(DatePicker_DayButton template)
 {
     this.template = template;
 }