DotVVM.BootstrapDateRangePicker
0.1.4
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package DotVVM.BootstrapDateRangePicker --version 0.1.4
NuGet\Install-Package DotVVM.BootstrapDateRangePicker -Version 0.1.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotVVM.BootstrapDateRangePicker" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotVVM.BootstrapDateRangePicker --version 0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotVVM.BootstrapDateRangePicker, 0.1.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotVVM.BootstrapDateRangePicker as a Cake Addin #addin nuget:?package=DotVVM.BootstrapDateRangePicker&version=0.1.4 // Install DotVVM.BootstrapDateRangePicker as a Cake Tool #tool nuget:?package=DotVVM.BootstrapDateRangePicker&version=0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotVVM Bootstrap Daterangepicker
This is a DotVVM control that wraps the Bootstrap Daterangepicker jQuery plugin.
Installation
You can install the control from NuGet:
Install-Package DotVVM.Bootstrap.Daterangepicker
or using the dotnet
command line:
dotnet add package DotVVM.Bootstrap.Daterangepicker
Usage
First, you need to include registration of the control in your DotvvmStartup.cs
file:
private void ConfigureControls(DotvvmConfiguration config, string applicationPath)
{
config.AddDateRangePicker();
}
Then, you can use the DateRangePicker
control in your DotHTML file:
<cc:DateRangePicker Value="{value: DateRange}"
Ranges="{resource: Ranges}"
ApplyLabel="OK"
CancelLabel="Storno"
CustomRangeLabel="Vlastn�"
class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><span class="fas fa-calendar"></span></span>
</div>
<span class="form-control" Visible="{value: DateRange.HasValue && !DateRange.HasSelectedRange}">
<dot:Literal Text="{value: DateRange.Start}" FormatString="d. M. yyyy">
</dot:Literal>
<span Visible="{value: !DateRange.IsOneDay}">
<span class="separator">-</span>
<dot:Literal Text="{value: DateRange.End}" FormatString="d. M. yyyy">
</dot:Literal>
</span>
</span>
<span class="form-control" Visible="{value: DateRange.HasValue && DateRange.HasSelectedRange}">
<dot:Literal Text="{value: DateRange.SelectedRange.Label}">
</dot:Literal>
</span>
<div class="input-group-append" Visible="{value: DateRange.HasValue}">
<dot:Button Click="{command: ClearDateRange()}"
ButtonTagName="button"
class="input-group-text">
<span class="fas fa-times"></span>
</dot:Button>
</div>
<span class="form-control text-muted" IncludeInPage="{value: !DateRange.HasValue}">
Choose date...
</span>
</cc:DateRangePicker>
The DateRange
and Ranges
properties should be defined in your viewmodel:
public DateRangeValue DateRange { get; set; } = new();
public List<DateRange> Ranges { get; set; } = new List<DateRange>()
{
new("today", "Today", DateTime.Today),
new("yesterday", "Yesterday", DateTime.Today.AddDays(-1)),
new("last7days", "Last 7 days", DateTime.Today.AddDays(-7)),
new("last30days", "Last 30 days", DateTime.Today.AddDays(-30)),
new("thismonth", "This month", new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1), DateTime.Today),
new("lastmonth", "Last month", new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).AddMonths(-1), new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).AddDays(-1))
};
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.4 | 79 | 12/25/2024 |