Skip to content

SyncfusionExamples/dotnet-maui-datepicker-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting started with .NET MAUI Date Picker

This section explains how to add the .NET MAUI Date Picker control. It covers only the basic features needed to get started with Syncfusion® Date Picker.

Register Syncfusion handler

Make sure to add the namespace.

{% highlight MauiProgram.cs %} using Syncfusion.Maui.Core.Hosting; {% endhighlight %}

Register the Syncfusion core handler in your CreateMauiApp method of MauiProgram.cs file to use Syncfusion controls.

{% highlight MauiProgram.cs %} builder.ConfigureSyncfusionCore(); {% endhighlight %}

Import the Date picker namespace

Add the following namespace in your XAML or C#.

{% tabs %} {% highlight xaml tabtitle="xaml" %} xmlns:picker="clr-namespace:Syncfusion.Maui.Picker;assembly=Syncfusion.Maui.Picker" {% endhighlight %} {% highlight c# tabtitle="C#" %} using Syncfusion.Maui.Picker; {% endhighlight %} {% endtabs %}

Add the Date picker component

Create an instance of Date Picker and add it to your page.

{% tabs %} {% highlight xaml tabtitle="XAML" %} <picker:SfDatePicker /> {% endhighlight %} {% highlight c# tabtitle="C#" %} SfDatePicker picker = new SfDatePicker(); this.Content = picker; {% endhighlight %} {% endtabs %}

The following screenshot illustrates the result of the above code.

Set Height and width in .NET MAUI Date picker.

You can download the Picker Getting Started sample from GitHub

About

This demo explains about how to use .NET MAUI DatePicker in .NET MAUI apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages