private async Task OnClickSidebarItem(DateTimeRangeSidebarItem item)
 {
     SelectedValue.Start = item.StartDateTime;
     SelectedValue.End   = item.EndDateTime;
     StartValue          = item.StartDateTime;
     EndValue            = StartValue.AddMonths(1);
     await ClickConfirmButton();
 }
        /// <summary>
        /// OnInitialized
        /// </summary>
        protected override void OnInitialized()
        {
            base.OnInitialized();

            StartValue = Value.Start;
            EndValue   = Value.End;

            if (StartValue == DateTime.MinValue)
            {
                StartValue = DateTime.Now;
            }
            if (EndValue == DateTime.MinValue)
            {
                EndValue = StartValue.AddMonths(1);
            }

            StartPlaceHolderText ??= Localizer[nameof(StartPlaceHolderText)];
            EndPlaceHolderText ??= Localizer[nameof(EndPlaceHolderText)];
            SeparateText ??= Localizer[nameof(SeparateText)];

            ClearButtonText ??= Localizer[nameof(ClearButtonText)];
            ConfirmButtonText ??= Localizer[nameof(ConfirmButtonText)];
            TodayButtonText ??= Localizer[nameof(TodayButtonText)];

            DateFormat ??= Localizer[nameof(DateFormat)];

            if (SidebarItems == null)
            {
                SidebarItems = new DateTimeRangeSidebarItem[]
                {
                    new DateTimeRangeSidebarItem {
                        Text = Localizer["Last7Days"], StartDateTime = DateTime.Today.AddDays(-7), EndDateTime = DateTime.Today
                    },
                    new DateTimeRangeSidebarItem {
                        Text = Localizer["Last30Days"], StartDateTime = DateTime.Today.AddDays(-30), EndDateTime = DateTime.Today
                    },
                    new DateTimeRangeSidebarItem {
                        Text = Localizer["ThisMonth"], StartDateTime = DateTime.Today.AddDays(1 - DateTime.Today.Day), EndDateTime = DateTime.Today.AddDays(1 - DateTime.Today.Day).AddMonths(1).AddDays(-1)
                    },
                    new DateTimeRangeSidebarItem {
                        Text = Localizer["LastMonth"], StartDateTime = DateTime.Today.AddDays(1 - DateTime.Today.Day).AddMonths(-1), EndDateTime = DateTime.Today.AddDays(1 - DateTime.Today.Day).AddDays(-1)
                    },
                };
            }
        }