!1655 feat(#I43A1B): resolve can not pick the front day that is disabled in preview month

* doc: 日期范围示例更改为45天
* fix: 修复当月前几个日期无法选中问题
* doc: remove space line
This commit is contained in:
Argo 2021-07-31 04:17:01 +00:00
parent cc06c39579
commit 6c3b5ee245
5 changed files with 9 additions and 8 deletions

View File

@ -117,7 +117,7 @@
<div class="row g-3">
<div class="col-12">
<DateTimePicker TValue="DateTime" ViewModel="DatePickerViewModel.Date" Value="@(DateTime.Today.AddDays(3 - DateTime.Today.Day))"
MinValue="@(DateTime.Today.AddDays(1 - DateTime.Today.Day))" MaxValue="@(DateTime.Today.AddDays(45))" />
MinValue="@(DateTime.Today.AddDays(1 - DateTime.Today.Day))" MaxValue="@(DateTime.Today.AddDays(46 - DateTime.Today.Day))" />
</div>
</div>
</Block>

View File

@ -572,7 +572,6 @@ namespace BootstrapBlazor.Components
ShowTimePicker = false;
if (Validate() && ValueChanged.HasDelegate)
{
await ValueChanged.InvokeAsync(Value);
}
if (OnConfirm != null)

View File

@ -56,7 +56,7 @@
}
});
$('.datetime-picker-input-icon').on('click', function (e) {
$el.find('.datetime-picker-input-icon').on('click', function (e) {
// handler disabled event
if ($(this).hasClass('disabled')) return;
@ -65,9 +65,11 @@
$input.trigger('click');
});
$('.disabled .cell').on('click', function (e) {
e.preventDefault();
e.stopImmediatePropagation();
$el.find('.date-table .cell').on('click', function (e) {
if ($(e.target).parent().parent().hasClass('disabled')) {
e.preventDefault();
e.stopImmediatePropagation();
}
});
}
else $input.popover(method);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long