コード例 #1
0
        private void DateOnMouseLeave()
        {
            if (IsRange)
            {
                DatePicker.HoverDateTime = null;
            }

            string placeholder;

            if (IsRange)
            {
                var(startPlaceholder, endPlaceholder) = DatePickerPlaceholder.GetRangePlaceHolderByType(Picker, Locale);

                if (DatePicker.GetOnFocusPickerIndex() == 0)
                {
                    placeholder = startPlaceholder;
                }
                else
                {
                    placeholder = endPlaceholder;
                }
            }
            else
            {
                placeholder = DatePickerPlaceholder.GetPlaceholderByType(Picker, Locale);
            }

            int focusIndex = DatePicker.GetOnFocusPickerIndex();

            DatePicker.ChangePlaceholder(placeholder, focusIndex);
        }
コード例 #2
0
        private void DateOnMouseEnter(DateTime hoverDateTime)
        {
            if (IsRange)
            {
                DatePicker.HoverDateTime = hoverDateTime;

                DatePicker.InvokeStateHasChanged();
            }

            int    focusIndex  = DatePicker.GetOnFocusPickerIndex();
            string placeholder = DatePicker.GetFormatValue(hoverDateTime, focusIndex);

            DatePicker.ChangePlaceholder(placeholder, focusIndex);
        }