mirror of https://github.com/abpframework/abp.git
20 changed files with 764 additions and 313 deletions
@ -1,147 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.DatePicker; |
|||
|
|||
public abstract class |
|||
AbpDatePickerBaseTagHelper<TTagHelper> : AbpTagHelper<TTagHelper, AbpDatePickerBaseTagHelperService<TTagHelper>> |
|||
where TTagHelper : AbpDatePickerBaseTagHelper<TTagHelper> |
|||
|
|||
{ |
|||
public string Label { get; set; } |
|||
|
|||
public string LabelTooltip { get; set; } |
|||
|
|||
public string LabelTooltipIcon { get; set; } = "bi-info-circle"; |
|||
|
|||
public string LabelTooltipPlacement { get; set; } = "right"; |
|||
|
|||
public bool LabelTooltipHtml { get; set; } = false; |
|||
|
|||
[HtmlAttributeName("info")] |
|||
public string InfoText { get; set; } |
|||
|
|||
[HtmlAttributeName("disabled")] |
|||
public bool IsDisabled { get; set; } = false; |
|||
|
|||
[HtmlAttributeName("readonly")] |
|||
public bool? IsReadonly { get; set; } = false; |
|||
|
|||
public bool AutoFocus { get; set; } |
|||
|
|||
[HtmlAttributeName("type")] |
|||
public string InputTypeName { get; set; } = "text"; |
|||
|
|||
public AbpFormControlSize Size { get; set; } = AbpFormControlSize.Default; |
|||
|
|||
[HtmlAttributeName("required-symbol")] |
|||
public bool DisplayRequiredSymbol { get; set; } = true; |
|||
|
|||
[HtmlAttributeName("asp-format")] |
|||
public string Format { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public string Value { get; set; } |
|||
|
|||
public bool SuppressLabel { get; set; } |
|||
|
|||
|
|||
// Min and Max date
|
|||
public DateTime? MinDate { get; set; } |
|||
|
|||
public DateTime? MaxDate { get; set; } |
|||
|
|||
// Max span between start and end date
|
|||
public object? MaxSpan { get; set; } |
|||
|
|||
// Show dropdowns
|
|||
public bool ShowDropdowns { get; set; } = true; |
|||
|
|||
// Min and Max year
|
|||
public int? MinYear { get; set; } |
|||
|
|||
public int? MaxYear { get; set; } |
|||
|
|||
// Show week numbers
|
|||
public AbpDatePickerWeekNumbers WeekNumbers { get; set; } = AbpDatePickerWeekNumbers.None; |
|||
|
|||
// Time picker
|
|||
public bool? TimePicker { get; set; } |
|||
|
|||
// Time picker increment
|
|||
public int? TimePickerIncrement { get; set; } |
|||
|
|||
// Time picker 24 hour
|
|||
public bool? TimePicker24Hour { get; set; } |
|||
|
|||
// Time picker seconds
|
|||
public bool? TimePickerSeconds { get; set; } |
|||
|
|||
// Ranges object
|
|||
public List<AbpDatePickerRange> Ranges { get; set; } |
|||
|
|||
// Show custom range label
|
|||
public bool ShowCustomRangeLabel { get; set; } = true; |
|||
|
|||
// Always show calendar
|
|||
public bool AlwaysShowCalendars { get; set; } = false; |
|||
|
|||
// Opens date picker on left or right or center of the input
|
|||
public AbpDatePickerOpens Opens { get; set; } = AbpDatePickerOpens.Center; |
|||
|
|||
// Drops down or up or auto
|
|||
public AbpDatePickerDrops Drops { get; set; } = AbpDatePickerDrops.Down; |
|||
|
|||
// Button classes
|
|||
[CanBeNull] |
|||
public string ButtonClasses { get; set; } |
|||
|
|||
// Apply class to all buttons
|
|||
[CanBeNull] |
|||
public string ApplyButtonClasses { get; set; } |
|||
|
|||
// Cancel class to all buttons
|
|||
[CanBeNull] |
|||
public string CancelButtonClasses { get; set; } |
|||
|
|||
// Locale
|
|||
[CanBeNull] |
|||
public object Locale { get; set; } |
|||
|
|||
// Auto apply
|
|||
public bool AutoApply { get; set; } = true; |
|||
|
|||
// Linked calendars
|
|||
public bool? LinkedCalendars { get; set; } |
|||
|
|||
// Auto update input
|
|||
public bool AutoUpdateInput { get; set; } = false; |
|||
|
|||
// Parent element
|
|||
[CanBeNull] |
|||
public string ParentEl { get; set; } |
|||
|
|||
// public DatePickerType Type { get; set; } = DatePickerType.Date;
|
|||
|
|||
[CanBeNull] |
|||
public string DateFormat { get; set; } |
|||
|
|||
public bool OpenButton { get; set; } = true; |
|||
|
|||
public bool ClearButton { get; set; } = true; |
|||
|
|||
public bool IsUtc { get; set; } = false; |
|||
|
|||
public bool IsIso { get; set; } = false; |
|||
|
|||
[CanBeNull] |
|||
public object Options { get; set; } |
|||
|
|||
protected AbpDatePickerBaseTagHelper(AbpDatePickerBaseTagHelperService<TTagHelper> service) : base(service) |
|||
{ |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.DatePicker; |
|||
|
|||
public enum AbpDatePickerDrops |
|||
{ |
|||
Down, |
|||
Up, |
|||
Auto |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.DatePicker; |
|||
|
|||
public enum AbpDatePickerOpens |
|||
{ |
|||
Left, |
|||
Right, |
|||
Center |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.DatePicker; |
|||
|
|||
public enum AbpDatePickerWeekNumbers |
|||
{ |
|||
None, |
|||
Normal, |
|||
Iso |
|||
} |
|||
@ -0,0 +1,208 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public abstract class |
|||
AbpDatePickerBaseTagHelper<TTagHelper> : AbpTagHelper<TTagHelper, AbpDatePickerBaseTagHelperService<TTagHelper>>, IAbpDatePickerOptions |
|||
where TTagHelper : AbpDatePickerBaseTagHelper<TTagHelper> |
|||
|
|||
{ |
|||
private IAbpDatePickerOptions _abpDatePickerOptionsImplementation; |
|||
public string Label { get; set; } |
|||
|
|||
public string LabelTooltip { get; set; } |
|||
|
|||
public string LabelTooltipIcon { get; set; } = "bi-info-circle"; |
|||
|
|||
public string LabelTooltipPlacement { get; set; } = "right"; |
|||
|
|||
public bool LabelTooltipHtml { get; set; } = false; |
|||
|
|||
[HtmlAttributeName("info")] |
|||
public string InfoText { get; set; } |
|||
|
|||
[HtmlAttributeName("disabled")] |
|||
public bool IsDisabled { get; set; } = false; |
|||
|
|||
[HtmlAttributeName("readonly")] |
|||
public bool? IsReadonly { get; set; } = false; |
|||
|
|||
public bool AutoFocus { get; set; } |
|||
|
|||
public AbpFormControlSize Size { get; set; } = AbpFormControlSize.Default; |
|||
|
|||
[HtmlAttributeName("required-symbol")] |
|||
public bool DisplayRequiredSymbol { get; set; } = true; |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public string Value { get; set; } |
|||
|
|||
public bool SuppressLabel { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
protected AbpDatePickerBaseTagHelper(AbpDatePickerBaseTagHelperService<TTagHelper> service) : base(service) |
|||
{ |
|||
_abpDatePickerOptionsImplementation = new AbpDatePickerOptions(); |
|||
} |
|||
|
|||
|
|||
public string PickerId { |
|||
get => _abpDatePickerOptionsImplementation.PickerId; |
|||
set => _abpDatePickerOptionsImplementation.PickerId = value; |
|||
} |
|||
|
|||
public DateTime? MinDate { |
|||
get => _abpDatePickerOptionsImplementation.MinDate; |
|||
set => _abpDatePickerOptionsImplementation.MinDate = value; |
|||
} |
|||
|
|||
public DateTime? MaxDate { |
|||
get => _abpDatePickerOptionsImplementation.MaxDate; |
|||
set => _abpDatePickerOptionsImplementation.MaxDate = value; |
|||
} |
|||
|
|||
public object MaxSpan { |
|||
get => _abpDatePickerOptionsImplementation.MaxSpan; |
|||
set => _abpDatePickerOptionsImplementation.MaxSpan = value; |
|||
} |
|||
|
|||
public bool? ShowDropdowns { |
|||
get => _abpDatePickerOptionsImplementation.ShowDropdowns; |
|||
set => _abpDatePickerOptionsImplementation.ShowDropdowns = value; |
|||
} |
|||
|
|||
public int? MinYear { |
|||
get => _abpDatePickerOptionsImplementation.MinYear; |
|||
set => _abpDatePickerOptionsImplementation.MinYear = value; |
|||
} |
|||
|
|||
public int? MaxYear { |
|||
get => _abpDatePickerOptionsImplementation.MaxYear; |
|||
set => _abpDatePickerOptionsImplementation.MaxYear = value; |
|||
} |
|||
|
|||
public AbpDatePickerWeekNumbers WeekNumbers { |
|||
get => _abpDatePickerOptionsImplementation.WeekNumbers; |
|||
set => _abpDatePickerOptionsImplementation.WeekNumbers = value; |
|||
} |
|||
|
|||
public bool? TimePicker { |
|||
get => _abpDatePickerOptionsImplementation.TimePicker; |
|||
set => _abpDatePickerOptionsImplementation.TimePicker = value; |
|||
} |
|||
|
|||
public int? TimePickerIncrement { |
|||
get => _abpDatePickerOptionsImplementation.TimePickerIncrement; |
|||
set => _abpDatePickerOptionsImplementation.TimePickerIncrement = value; |
|||
} |
|||
|
|||
public bool? TimePicker24Hour { |
|||
get => _abpDatePickerOptionsImplementation.TimePicker24Hour; |
|||
set => _abpDatePickerOptionsImplementation.TimePicker24Hour = value; |
|||
} |
|||
|
|||
public bool? TimePickerSeconds { |
|||
get => _abpDatePickerOptionsImplementation.TimePickerSeconds; |
|||
set => _abpDatePickerOptionsImplementation.TimePickerSeconds = value; |
|||
} |
|||
|
|||
public List<AbpDatePickerRange> Ranges { |
|||
get => _abpDatePickerOptionsImplementation.Ranges; |
|||
set => _abpDatePickerOptionsImplementation.Ranges = value; |
|||
} |
|||
|
|||
public bool? ShowCustomRangeLabel { |
|||
get => _abpDatePickerOptionsImplementation.ShowCustomRangeLabel; |
|||
set => _abpDatePickerOptionsImplementation.ShowCustomRangeLabel = value; |
|||
} |
|||
|
|||
public bool? AlwaysShowCalendars { |
|||
get => _abpDatePickerOptionsImplementation.AlwaysShowCalendars; |
|||
set => _abpDatePickerOptionsImplementation.AlwaysShowCalendars = value; |
|||
} |
|||
|
|||
public AbpDatePickerOpens Opens { |
|||
get => _abpDatePickerOptionsImplementation.Opens; |
|||
set => _abpDatePickerOptionsImplementation.Opens = value; |
|||
} |
|||
|
|||
public AbpDatePickerDrops Drops { |
|||
get => _abpDatePickerOptionsImplementation.Drops; |
|||
set => _abpDatePickerOptionsImplementation.Drops = value; |
|||
} |
|||
|
|||
public string ButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.ButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.ButtonClasses = value; |
|||
} |
|||
|
|||
public string ApplyButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.ApplyButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.ApplyButtonClasses = value; |
|||
} |
|||
|
|||
public string CancelButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.CancelButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.CancelButtonClasses = value; |
|||
} |
|||
|
|||
public object Locale { |
|||
get => _abpDatePickerOptionsImplementation.Locale; |
|||
set => _abpDatePickerOptionsImplementation.Locale = value; |
|||
} |
|||
|
|||
public bool? AutoApply { |
|||
get => _abpDatePickerOptionsImplementation.AutoApply; |
|||
set => _abpDatePickerOptionsImplementation.AutoApply = value; |
|||
} |
|||
|
|||
public bool? LinkedCalendars { |
|||
get => _abpDatePickerOptionsImplementation.LinkedCalendars; |
|||
set => _abpDatePickerOptionsImplementation.LinkedCalendars = value; |
|||
} |
|||
|
|||
public bool? AutoUpdateInput { |
|||
get => _abpDatePickerOptionsImplementation.AutoUpdateInput; |
|||
set => _abpDatePickerOptionsImplementation.AutoUpdateInput = value; |
|||
} |
|||
|
|||
public string ParentEl { |
|||
get => _abpDatePickerOptionsImplementation.ParentEl; |
|||
set => _abpDatePickerOptionsImplementation.ParentEl = value; |
|||
} |
|||
|
|||
public string DateFormat { |
|||
get => _abpDatePickerOptionsImplementation.DateFormat; |
|||
set => _abpDatePickerOptionsImplementation.DateFormat = value; |
|||
} |
|||
|
|||
public bool OpenButton { |
|||
get => _abpDatePickerOptionsImplementation.OpenButton; |
|||
set => _abpDatePickerOptionsImplementation.OpenButton = value; |
|||
} |
|||
|
|||
public bool ClearButton { |
|||
get => _abpDatePickerOptionsImplementation.ClearButton; |
|||
set => _abpDatePickerOptionsImplementation.ClearButton = value; |
|||
} |
|||
|
|||
public bool? IsUtc { |
|||
get => _abpDatePickerOptionsImplementation.IsUtc; |
|||
set => _abpDatePickerOptionsImplementation.IsUtc = value; |
|||
} |
|||
|
|||
public bool? IsIso { |
|||
get => _abpDatePickerOptionsImplementation.IsIso; |
|||
set => _abpDatePickerOptionsImplementation.IsIso = value; |
|||
} |
|||
|
|||
public object Options { |
|||
get => _abpDatePickerOptionsImplementation.Options; |
|||
set => _abpDatePickerOptionsImplementation.Options = value; |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public enum AbpDatePickerDrops |
|||
{ |
|||
Down, |
|||
Up, |
|||
Auto |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public enum AbpDatePickerOpens |
|||
{ |
|||
Left, |
|||
Right, |
|||
Center |
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public class AbpDatePickerOptions : IAbpDatePickerOptions |
|||
{ |
|||
public string PickerId { get; set; } |
|||
public DateTime? MinDate { get; set; } |
|||
public DateTime? MaxDate { get; set; } |
|||
public object MaxSpan { get; set; } |
|||
public bool? ShowDropdowns { get; set; } |
|||
public int? MinYear { get; set; } |
|||
public int? MaxYear { get; set; } |
|||
public AbpDatePickerWeekNumbers WeekNumbers { get; set; } = AbpDatePickerWeekNumbers.None; |
|||
public bool? TimePicker { get; set; } |
|||
public int? TimePickerIncrement { get; set; } |
|||
public bool? TimePicker24Hour { get; set; } |
|||
public bool? TimePickerSeconds { get; set; } |
|||
public List<AbpDatePickerRange> Ranges { get; set; } |
|||
public bool? ShowCustomRangeLabel { get; set; } |
|||
public bool? AlwaysShowCalendars { get; set; } |
|||
public AbpDatePickerOpens Opens { get; set; } = AbpDatePickerOpens.Center; |
|||
public AbpDatePickerDrops Drops { get; set; } = AbpDatePickerDrops.Down; |
|||
public string ButtonClasses { get; set; } |
|||
public string ApplyButtonClasses { get; set; } |
|||
public string CancelButtonClasses { get; set; } |
|||
public object Locale { get; set; } |
|||
public bool? AutoApply { get; set; } |
|||
public bool? LinkedCalendars { get; set; } |
|||
public bool? AutoUpdateInput { get; set; } |
|||
public string ParentEl { get; set; } |
|||
public string DateFormat { get; set; } |
|||
public bool OpenButton { get; set; } = true; |
|||
public bool ClearButton { get; set; } = true; |
|||
public bool? IsUtc { get; set; } |
|||
public bool? IsIso { get; set; } |
|||
public object Options { get; set; } |
|||
} |
|||
@ -1,7 +1,7 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.DatePicker; |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public class AbpDatePickerRange |
|||
{ |
|||
@ -0,0 +1,16 @@ |
|||
using JetBrains.Annotations; |
|||
using Microsoft.AspNetCore.Mvc.ViewFeatures; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
[HtmlTargetElement("abp-date-picker", TagStructure = TagStructure.NormalOrSelfClosing)] |
|||
public class AbpDatePickerTagHelper : AbpDatePickerBaseTagHelper<AbpDatePickerTagHelper> |
|||
{ |
|||
[CanBeNull] |
|||
public ModelExpression AspFor { get; set; } |
|||
|
|||
public AbpDatePickerTagHelper(AbpDatePickerTagHelperService service) : base(service) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public enum AbpDatePickerWeekNumbers |
|||
{ |
|||
None, |
|||
Normal, |
|||
Iso |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
using JetBrains.Annotations; |
|||
using Microsoft.AspNetCore.Mvc.ViewFeatures; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
[HtmlTargetElement("abp-date-range-picker", TagStructure = TagStructure.NormalOrSelfClosing)] |
|||
public class AbpDateRangePickerTagHelper : AbpDatePickerBaseTagHelper<AbpDateRangePickerTagHelper> |
|||
{ |
|||
// Start date
|
|||
[CanBeNull] |
|||
public ModelExpression AspForStart { get; set; } |
|||
|
|||
// End date
|
|||
[CanBeNull] |
|||
public ModelExpression AspForEnd { get; set; } |
|||
|
|||
public AbpDateRangePickerTagHelper(AbpDateRangePickerTagHelperService tagHelperService) : base(tagHelperService) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
[AttributeUsage(AttributeTargets.Property)] |
|||
public class DatePickerAttribute : Attribute |
|||
{ |
|||
} |
|||
@ -0,0 +1,169 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public class DatePickerOptionsAttribute : Attribute, IAbpDatePickerOptions |
|||
{ |
|||
private IAbpDatePickerOptions _abpDatePickerOptionsImplementation; |
|||
|
|||
public DatePickerOptionsAttribute() |
|||
{ |
|||
_abpDatePickerOptionsImplementation = new AbpDatePickerOptions(); |
|||
} |
|||
|
|||
public string PickerId { |
|||
get => _abpDatePickerOptionsImplementation.PickerId; |
|||
set => _abpDatePickerOptionsImplementation.PickerId = value; |
|||
} |
|||
|
|||
public DateTime? MinDate { |
|||
get => _abpDatePickerOptionsImplementation.MinDate; |
|||
set => _abpDatePickerOptionsImplementation.MinDate = value; |
|||
} |
|||
|
|||
public DateTime? MaxDate { |
|||
get => _abpDatePickerOptionsImplementation.MaxDate; |
|||
set => _abpDatePickerOptionsImplementation.MaxDate = value; |
|||
} |
|||
|
|||
public object MaxSpan { |
|||
get => _abpDatePickerOptionsImplementation.MaxSpan; |
|||
set => _abpDatePickerOptionsImplementation.MaxSpan = value; |
|||
} |
|||
|
|||
public bool? ShowDropdowns { |
|||
get => _abpDatePickerOptionsImplementation.ShowDropdowns; |
|||
set => _abpDatePickerOptionsImplementation.ShowDropdowns = value; |
|||
} |
|||
|
|||
public int? MinYear { |
|||
get => _abpDatePickerOptionsImplementation.MinYear; |
|||
set => _abpDatePickerOptionsImplementation.MinYear = value; |
|||
} |
|||
|
|||
public int? MaxYear { |
|||
get => _abpDatePickerOptionsImplementation.MaxYear; |
|||
set => _abpDatePickerOptionsImplementation.MaxYear = value; |
|||
} |
|||
|
|||
public AbpDatePickerWeekNumbers WeekNumbers { |
|||
get => _abpDatePickerOptionsImplementation.WeekNumbers; |
|||
set => _abpDatePickerOptionsImplementation.WeekNumbers = value; |
|||
} |
|||
|
|||
public bool? TimePicker { |
|||
get => _abpDatePickerOptionsImplementation.TimePicker; |
|||
set => _abpDatePickerOptionsImplementation.TimePicker = value; |
|||
} |
|||
|
|||
public int? TimePickerIncrement { |
|||
get => _abpDatePickerOptionsImplementation.TimePickerIncrement; |
|||
set => _abpDatePickerOptionsImplementation.TimePickerIncrement = value; |
|||
} |
|||
|
|||
public bool? TimePicker24Hour { |
|||
get => _abpDatePickerOptionsImplementation.TimePicker24Hour; |
|||
set => _abpDatePickerOptionsImplementation.TimePicker24Hour = value; |
|||
} |
|||
|
|||
public bool? TimePickerSeconds { |
|||
get => _abpDatePickerOptionsImplementation.TimePickerSeconds; |
|||
set => _abpDatePickerOptionsImplementation.TimePickerSeconds = value; |
|||
} |
|||
|
|||
public List<AbpDatePickerRange> Ranges { |
|||
get => _abpDatePickerOptionsImplementation.Ranges; |
|||
set => _abpDatePickerOptionsImplementation.Ranges = value; |
|||
} |
|||
|
|||
public bool? ShowCustomRangeLabel { |
|||
get => _abpDatePickerOptionsImplementation.ShowCustomRangeLabel; |
|||
set => _abpDatePickerOptionsImplementation.ShowCustomRangeLabel = value; |
|||
} |
|||
|
|||
public bool? AlwaysShowCalendars { |
|||
get => _abpDatePickerOptionsImplementation.AlwaysShowCalendars; |
|||
set => _abpDatePickerOptionsImplementation.AlwaysShowCalendars = value; |
|||
} |
|||
|
|||
public AbpDatePickerOpens Opens { |
|||
get => _abpDatePickerOptionsImplementation.Opens; |
|||
set => _abpDatePickerOptionsImplementation.Opens = value; |
|||
} |
|||
|
|||
public AbpDatePickerDrops Drops { |
|||
get => _abpDatePickerOptionsImplementation.Drops; |
|||
set => _abpDatePickerOptionsImplementation.Drops = value; |
|||
} |
|||
|
|||
public string ButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.ButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.ButtonClasses = value; |
|||
} |
|||
|
|||
public string ApplyButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.ApplyButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.ApplyButtonClasses = value; |
|||
} |
|||
|
|||
public string CancelButtonClasses { |
|||
get => _abpDatePickerOptionsImplementation.CancelButtonClasses; |
|||
set => _abpDatePickerOptionsImplementation.CancelButtonClasses = value; |
|||
} |
|||
|
|||
public object Locale { |
|||
get => _abpDatePickerOptionsImplementation.Locale; |
|||
set => _abpDatePickerOptionsImplementation.Locale = value; |
|||
} |
|||
|
|||
public bool? AutoApply { |
|||
get => _abpDatePickerOptionsImplementation.AutoApply; |
|||
set => _abpDatePickerOptionsImplementation.AutoApply = value; |
|||
} |
|||
|
|||
public bool? LinkedCalendars { |
|||
get => _abpDatePickerOptionsImplementation.LinkedCalendars; |
|||
set => _abpDatePickerOptionsImplementation.LinkedCalendars = value; |
|||
} |
|||
|
|||
public bool? AutoUpdateInput { |
|||
get => _abpDatePickerOptionsImplementation.AutoUpdateInput; |
|||
set => _abpDatePickerOptionsImplementation.AutoUpdateInput = value; |
|||
} |
|||
|
|||
public string ParentEl { |
|||
get => _abpDatePickerOptionsImplementation.ParentEl; |
|||
set => _abpDatePickerOptionsImplementation.ParentEl = value; |
|||
} |
|||
|
|||
public string DateFormat { |
|||
get => _abpDatePickerOptionsImplementation.DateFormat; |
|||
set => _abpDatePickerOptionsImplementation.DateFormat = value; |
|||
} |
|||
|
|||
public bool OpenButton { |
|||
get => _abpDatePickerOptionsImplementation.OpenButton; |
|||
set => _abpDatePickerOptionsImplementation.OpenButton = value; |
|||
} |
|||
|
|||
public bool ClearButton { |
|||
get => _abpDatePickerOptionsImplementation.ClearButton; |
|||
set => _abpDatePickerOptionsImplementation.ClearButton = value; |
|||
} |
|||
|
|||
public bool? IsUtc { |
|||
get => _abpDatePickerOptionsImplementation.IsUtc; |
|||
set => _abpDatePickerOptionsImplementation.IsUtc = value; |
|||
} |
|||
|
|||
public bool? IsIso { |
|||
get => _abpDatePickerOptionsImplementation.IsIso; |
|||
set => _abpDatePickerOptionsImplementation.IsIso = value; |
|||
} |
|||
|
|||
public object Options { |
|||
get => _abpDatePickerOptionsImplementation.Options; |
|||
set => _abpDatePickerOptionsImplementation.Options = value; |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
[AttributeUsage(AttributeTargets.Property)] |
|||
public class DateRangePickerAttribute : Attribute |
|||
{ |
|||
public string PickerId { get; set; } |
|||
public bool IsStart { get; set; } |
|||
|
|||
public DateRangePickerAttribute(string pickerId, bool isStart = false) |
|||
{ |
|||
PickerId = pickerId; |
|||
IsStart = isStart; |
|||
} |
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.DatePicker; |
|||
|
|||
public interface IAbpDatePickerOptions |
|||
{ |
|||
public string PickerId { get; set; } |
|||
// Min and Max date
|
|||
DateTime? MinDate { get; set; } |
|||
|
|||
DateTime? MaxDate { get; set; } |
|||
|
|||
// Max span between start and end date
|
|||
object? MaxSpan { get; set; } |
|||
|
|||
// Show dropdowns
|
|||
bool? ShowDropdowns { get; set; } |
|||
|
|||
// Min and Max year
|
|||
int? MinYear { get; set; } |
|||
|
|||
int? MaxYear { get; set; } |
|||
|
|||
// Show week numbers
|
|||
AbpDatePickerWeekNumbers WeekNumbers { get; set; } |
|||
|
|||
// Time picker
|
|||
bool? TimePicker { get; set; } |
|||
|
|||
// Time picker increment
|
|||
int? TimePickerIncrement { get; set; } |
|||
|
|||
// Time picker 24 hour
|
|||
bool? TimePicker24Hour { get; set; } |
|||
|
|||
// Time picker seconds
|
|||
bool? TimePickerSeconds { get; set; } |
|||
|
|||
// Ranges object
|
|||
List<AbpDatePickerRange> Ranges { get; set; } |
|||
|
|||
// Show custom range label
|
|||
bool? ShowCustomRangeLabel { get; set; } |
|||
|
|||
// Always show calendar
|
|||
bool? AlwaysShowCalendars { get; set; } |
|||
|
|||
// Opens date picker on left or right or center of the input
|
|||
AbpDatePickerOpens Opens { get; set; } |
|||
|
|||
// Drops down or up or auto
|
|||
AbpDatePickerDrops Drops { get; set; } |
|||
|
|||
// Button classes
|
|||
[CanBeNull] |
|||
string ButtonClasses { get; set; } |
|||
|
|||
// Apply class to all buttons
|
|||
[CanBeNull] |
|||
string ApplyButtonClasses { get; set; } |
|||
|
|||
// Cancel class to all buttons
|
|||
[CanBeNull] |
|||
string CancelButtonClasses { get; set; } |
|||
|
|||
// Locale
|
|||
[CanBeNull] |
|||
object Locale { get; set; } |
|||
|
|||
// Auto apply
|
|||
bool? AutoApply { get; set; } |
|||
|
|||
// Linked calendars
|
|||
bool? LinkedCalendars { get; set; } |
|||
|
|||
// Auto update input
|
|||
bool? AutoUpdateInput { get; set; } |
|||
|
|||
// Parent element
|
|||
[CanBeNull] |
|||
string ParentEl { get; set; } |
|||
|
|||
// DatePickerType Type { get; set; } = DatePickerType.Date;
|
|||
|
|||
[CanBeNull] |
|||
string DateFormat { get; set; } |
|||
|
|||
bool OpenButton { get; set; } |
|||
|
|||
bool ClearButton { get; set; } |
|||
|
|||
bool? IsUtc { get; set; } |
|||
|
|||
bool? IsIso { get; set; } |
|||
|
|||
[CanBeNull] |
|||
object Options { get; set; } |
|||
} |
|||
Loading…
Reference in new issue