Loading...
Loading...
Implements the Syncfusion WPF DateTimeEdit (DateTimePicker) control for date and time selection with dropdown calendar/clock support. Use this when adding datetime pickers, masked datetime input, or datetime selection controls in WPF applications. Covers DateTime binding, mask/free-form editing, pattern formatting, CultureInfo localization, dropdown views, date range restrictions, blackout dates, null value handling, watermarks, and theming with SfSkinManager.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-datetimepickerDateTimeCultureInfo| Class | Namespace | Assembly |
|---|---|---|
| | |
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"Install-Package Syncfusion.Shared.WPFDateTimeDateTimeChangedPatternMinDateTimeMaxDateTimeCanEdit="True"EnableMouseWheelEditIsVisibleRepeatButtonIsEnabledRepeatButtonEnableAlphaKeyNavigationOnFocusBehaviorAutoForwardingPatternCustomPatternPattern="CustomPattern"DateTimeFormatDateTimeFormatInfoCultureInfoPatternChangedCustomPatternChangedDropDownViewTodayButtonActionIsEmptyDateEnabledAbbreviatedMonthNamesShortestDayNamesPopupDelayIsButtonPopUpEnabledDropDownButtonTemplateTimeStepIntervalMinDateTimeMaxDateTimeBlackoutDatesDisableDateSelectionIsReadOnlyNullValueIsEmptyDateEnabledShowMaskOnNullValueNoneDateTextForegroundBackgroundSelectionBrushFocusedBorderBrushFlowDirectionCurrentUICultureSyncfusion.Shared.Wpf.{culture}.resx<!-- MainWindow.xaml -->
<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<syncfusion:DateTimeEdit DateTime="{Binding SelectedDate, Mode=TwoWay}"
Pattern="ShortDate"
MinDateTime="01/01/2020"
MaxDateTime="12/31/2030"
Height="25" Width="200"
Name="dateTimeEdit"/>
</StackPanel>
</Window>// ViewModel.cs
public class ViewModel : NotificationObject
{
private DateTime _selectedDate = DateTime.Now;
public DateTime SelectedDate
{
get => _selectedDate;
set { _selectedDate = value; RaisePropertyChanged(nameof(SelectedDate)); }
}
}| Scenario | Properties / Approach |
|---|---|
| Two-way date binding | |
| Show calendar + clock | |
| Free-form text editing | |
| Date-only range restriction | |
| Allow null / clear value | |
| Watermark when null | Add |
| Custom date display | |
| Culture-aware formatting | |
| Read-only input | |
| RTL layout | |
| Apply theme | |
| Property | Type | Default | Description |
|---|---|---|---|
| | | Selected date/time value |
| | | Display format pattern |
| | | Custom format string (requires |
| | System culture | Locale for date formatting |
| | | Enable free-form text editing |
| | | Minimum selectable date |
| | | Maximum selectable date |
| | | Popup content: Calendar/Clock/Combined |
| | | Allow null date value |
| | | Value when date is cleared |
| | | Watermark text when value is null |
| | | Show mask vs watermark when null |
| | | Prevent user edits |
| | | Show up/down spinner buttons |
| | | Allow mouse wheel to change value |