Provides a dialog box and a standalone MaterialDesign style control for selecting a range of dates. You can choose from the beginning and end of the month, quarter or year, or choose them arbitrarily.
$ dotnet add package DateRangeControlsYou might install Nuget package:
install-package DateRangeControls
Add this code to show DateRangePickerDialog:
var dlg = new DateRangePickerDialog(); dlg.Show();
After Dialogs work is done, You can use users selected dates this way, for example:
var dateFrom = dlg.DateFrom; var dateTo = dlg.DateTo;
To use MaterialDesign themes please add this lines in Your App.xaml:
... xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="Green" SecondaryColor="LightGreen"/> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
To try using dialog You may download sampleApp at: https://daralex.visualstudio.com/LogAn/_git/DateRangeSelector