DateTimePicker.MAUI
1.0.0
dotnet add package DateTimePicker.MAUI --version 1.0.0
NuGet\Install-Package DateTimePicker.MAUI -Version 1.0.0
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="DateTimePicker.MAUI" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DateTimePicker.MAUI --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DateTimePicker.MAUI, 1.0.0"
#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 DateTimePicker.MAUI as a Cake Addin #addin nuget:?package=DateTimePicker.MAUI&version=1.0.0 // Install DateTimePicker.MAUI as a Cake Tool #tool nuget:?package=DateTimePicker.MAUI&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DateTimePicker.MAUI
A DateTime picker for MAUI that you could custom as you prefer.
You could define styles for all its components:
public Style BorderStyle;
public Style SpinnerSelectionBorderStyle;
public Style LabelStyle;
public Style DaySpinnerStyle;
public Style MonthSpinnerStyle;
public Style YearSpinnerStyle;
public Style HourSpinnerStyle;
public Style MinuteSpinnerStyle;
public Style SecondSpinnerStyle;
public Style TimeSpinnerStyle;
public Style SpinnerItemStyle;
public Style SeparatorLabelStyle;
public Style CalendarStyle;
...
You could choose between the diferents picker layouts:
CenterSpinner
DownSpinner
UpSpinner
CenterCalendar
DownCalendar
UpCalendar
CenterCalendarAndSpinner
DownCalendarAndSpinner
UpCalendarAndSpinner
Set the Date and Time formats:
DMY
MDY
YMD
YDM
TwentyFourHours
TwelveHours
And a lot of more properties.
#### Create a DateTimePicker in your code
```C#
using DateTimePicker.MAUI;
...
public DateTimePicker MyDateTime { get; set; } = new DateTimePicker();
...
MyDateTime.SelectionChanged += MyDateTime_SelectionChanged;
...
private void MyDateTime_SelectionChanged(object sender, EventArgs e)
{
Debug.WriteLine($"Selected datetime = {MyDateTime.SelectedDateTime}");
}
Add the following xmlns to your page or view
xmlns:dtp="clr-namespace:DateTimePicker.MAUI;assembly=DateTimePicker.MAUI"
Use and custom the DateTimePicker in your xaml
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dtp="clr-namespace:DateTimePicker.MAUI;assembly=DateTimePicker.MAUI"
xmlns:cc="clr-namespace:CalendarView.MAUI;assembly=CalendarView.MAUI"
x:Class="DatetimePicker.MAUI.Test.MainPage">
<ContentPage.Resources>
<Style TargetType="cc:CalendarView" x:Key="CalendarMonthStyle">
<Setter Property="WidthRequest" Value="220"/>
<Setter Property="HeightRequest" Value="220"/>
<Setter Property="FirstDayOfWeekStyle">
<Setter.Value>
<Style TargetType="cc:CalendarDayView">
<Setter Property="DayColor" Value="Red"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="BorderStyle">
<Setter.Value>
<Style TargetType="Border">
<Setter Property="StrokeThickness" Value="0"/>
</Style>
</Setter.Value>
</Setter>
</Style>
</ContentPage.Resources>
<Grid HorizontalOptions="Fill" VerticalOptions="Fill">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<dtp:DateTimePicker x:Name="dtpicker1" Grid.Row="0" HorizontalOptions="Center" VerticalOptions="Center"
EditHeight="310" NoEditHeight="50" EditWidth="230" NoEditWidth="190" ShowDaySpinner="False" UseAnimation="True" CalendarStyle="{StaticResource Key=CalendarMonthStyle}"
ShowMonthSpinner="False" ShowYearSpinner="False" PickerType="CenterCalendarAndSpinner" InputTimeFormat="TwelveHours" DateTimeFormat="MM/dd/yyyy hh:mm:ss"/>
<dtp:DateTimePicker x:Name="dtpicker2" Grid.Row="1" HorizontalOptions="Start" VerticalOptions="Start" PickerType="UpCalendar" InputDateFormat="MDY" DateTimeFormat="MM/dd/yyyy"/>
</Grid>
</ContentPage>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net7.0-ios was computed. net7.0-ios16.1 is compatible. net7.0-maccatalyst was computed. net7.0-maccatalyst16.1 is compatible. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows10.0.19041 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- CalendarView.MAUI (>= 1.1.0)
- Spinner.MAUI (>= 1.1.2)
-
net7.0-android33.0
- CalendarView.MAUI (>= 1.1.0)
- Spinner.MAUI (>= 1.1.2)
-
net7.0-ios16.1
- CalendarView.MAUI (>= 1.1.0)
- Spinner.MAUI (>= 1.1.2)
-
net7.0-maccatalyst16.1
- CalendarView.MAUI (>= 1.1.0)
- Spinner.MAUI (>= 1.1.2)
-
net7.0-windows10.0.19041
- CalendarView.MAUI (>= 1.1.0)
- Spinner.MAUI (>= 1.1.2)
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 |
---|---|---|
1.0.0 | 370 | 2/18/2023 |