Closed lucianparvu closed 4 years ago
Hello, try <DateRangePicker LinkedCalendars="true" .... />
Hi, Thank's for answer.
I have Tried but it is not working correctly with LinkedCalendars="true" , looks to be the same problem
In my opinion the problem is the second calendar because displays the same month. Maybe the End Date should be set in a different way . In My Case Item.FromDate and Item.ToDate are DateTime .
Thank's
I've found and fixed the issue, just update the package to version 2.3.0
Yes, It is working now, I have tested it in many situations. Thank's
I want to use the DateRangePicker to save the selected range dates into database. It works perfect when I add a new item lets say a Product, but when I edit one ( Go to a new page /Edit?ProductId=1) the second calendar displays the same Month.
I am missing something ?
My Code: ` <DateRangePicker @bind-StartDate="StartDate" @bind-EndDate="EndDate" Culture="@(System.Globalization.CultureInfo.GetCultureInfo("ro-RO"))" ApplyLabel="@_SharedLocalizer["Apply"]" CancelLabel="@_SharedLocalizer["Cancel"]">
@code { DateTimeOffset? StartDate { get; set; } = DateTime.Today.AddMonths(-1); DateTimeOffset? EndDate { get; set; } = DateTime.Today.AddDays(1).AddTicks(-1); } protected override async Task OnInitializedAsync() { .... var item = await _Service.GetAtributeValueByID(AtributeValueID.Value); if (Item.FromDate.HasValue) { StartDate = Item.FromDate; } if (Item.ToDate.HasValue) { EndDate = Item.ToDate; } }`