Example #1
0
        protected override IEnumerable <LoopingSelector> GetSelectorsOrderedByCulturePattern()
        {
            string pattern = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern.ToUpperInvariant();

            if (MyDatePickerPage.DateShouldFlowRTL())
            {
                char[] charArray = pattern.ToCharArray();
                Array.Reverse((Array)charArray);
                pattern = new string(charArray);
            }
            return(DateTimePickerPageBase.GetSelectorsOrderedByCulturePattern(pattern, new char[3] {
                'Y', 'M', 'D'
            }, new LoopingSelector[3] {
                this.PrimarySelector, this.SecondarySelector, this.TertiarySelector
            }));
        }
Example #2
0
        protected override IEnumerable <LoopingSelector> GetSelectorsOrderedByCulturePattern()
        {
            string pattern = CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern.ToUpperInvariant();

            if (DateTimePickerBase.IsRTLLanguage())
            {
                string[] strArray = pattern.Split(' ');
                Array.Reverse((Array)strArray);
                pattern = string.Join(" ", strArray);
            }
            return(DateTimePickerPageBase.GetSelectorsOrderedByCulturePattern(pattern, new char[3] {
                'H', 'M', 'T'
            }, new LoopingSelector[3] {
                this.PrimarySelector, this.SecondarySelector, this.TertiarySelector
            }));
        }