Beispiel #1
0
        private static void SetUpDatePicker(TimeSheetViewModel vm)
        {
            jQueryObject element = jQuery.Select("#datepicker");
 
            string dateFormat = "dd/MM/yy";
            if (OrganizationServiceProxy.UserSettings != null)
            {
                dateFormat = OrganizationServiceProxy.UserSettings.DateFormatString;
            }

            DatePickerOptions2 options2 = new DatePickerOptions2();
            options2.NumberOfMonths = 3;
            options2.FirstDay = OrganizationServiceProxy.OrganizationSettings.WeekStartDayCode.Value.Value;
            options2.DateFormat = dateFormat.Replace("MM", "mm").Replace("yyyy", "yy").Replace("M", "m");


            // Wire up onSelect event
            options2.OnSelect = delegate(string dateText, object instance)
            {
                // Commit any of the current edits
                EditController controller = sessionsGrid.GetEditController();
                bool editCommited = controller.commitCurrentEdit();
                if (editCommited)
                {
                    DateTime date = (DateTime)element.Plugin<DatePickerObject>().DatePicker(DatePickerMethod.GetDate);
                    vm.Days.SetCurrentWeek(date);
                }
            };

            element.Plugin<DatePickerPlugIn>().DatePicker(options2);


        }
Beispiel #2
0
 public object DatePicker(DatePickerOptions2 options)
 {
     return(null);
 }
Beispiel #3
0
 public object DatePicker(DatePickerOptions2 options)
 {
     return null;
 }