The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
SPSakthivel Palaniyappan Syncfusion Team February 22, 2021 08:53 AM UTC
Hi Shraddha,
Greetings from Syncfusion.
We have analyzed your query and we can achieve your requirement of “Set default date as today date” by setting SelectedItem property of SfPicker as like below code snippet.
XAML:
<picker:CustomDatePicker
x:Name="date"
ColumnHeaderHeight="40"
HorizontalOptions="Center"
PickerHeight="400"
PickerMode="Dialog"
PickerWidth="300"
SelectedItem="{Binding StartDate}"
VerticalOptions="Center" />
ViewModel:
public ObservableCollection<object> StartDate
{
get { return _startdate; }
set { _startdate = value; RaisePropertyChanged("StartDate"); }
}
publicDatePickerViewModel()
{
ObservableCollection<object> todaycollection = new ObservableCollection<object>();
We have SfDatePicker control also for select the dates, please refer more details about SfDatePicker. By default it will take the today date as default date.