DateTimePicker
in namespace DotVVM.Framework.Controls.Bootstrap4
Renders a DateTimePicker control which lets the user either to type the date, or select it from a calendar pop-up.
Usage & Scenarios
Renders a textbox control which lets the user either to type the date, or select it from a calendar popup.
Sample 1: Basic Usage
Use the SelectedDate property to get or set the selected date.
The DateTimePicker can be switched into three different modes using the Mode property: DateTime, Date and Time.
The FormatString property specifies the format that will be used to display selected date. Use standard or
custom .NET date format strings.
The language of the calendar and the first day of week is specified by the request culture. You can find more info in the Globalization tutorial.
<bs:DateTimePicker SelectedDate="{value: Date}" FormatString="d" Mode="DateTime" />
                                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotVVM.Framework.ViewModel;
namespace DotvvmWeb.Views.Docs.Controls.bootstrap.DateTimePicker.sample1
{
    public class ViewModel : DotvvmViewModelBase
    {
        public DateTime? Date { get; set; }
        public ViewModel()
        {
            Date = DateTime.Now;
        }
    }
}
                                Properties
| Name | Type | Description | Notes | Default Value | |
|---|---|---|---|---|---|
| Attributes | Dictionary<String,Object> | 
                                         attribute 
                                        
                                        static value 
                                        
                                        
                                     | 
                                    null | ||
| ClientIDMode | ClientIDMode | Gets or sets the client ID generation algorithm. | 
                                         attribute 
                                        
                                        static value 
                                        
                                        
                                     | 
                                    Static | |
| DataContext | Object | Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value. | 
                                         attribute 
                                        
                                        
                                        bindable 
                                        
                                     | 
                                    null | |
| Enabled | Boolean | Gets or sets whether the control is enabled. | 
                                         attribute 
                                        
                                        static value 
                                        bindable 
                                        
                                     | 
                                    True | |
| FormatString | String | Gets or sets format string that will be used to display the date. | 
                                         attribute 
                                        
                                        static value 
                                        
                                        
                                     | 
                                    null | |
| ID | String | Gets or sets the unique control ID. | 
                                         attribute 
                                        
                                        static value 
                                        bindable 
                                        
                                     | 
                                    null | |
| IncludeInPage | Boolean | Gets or sets whether the control is included in the DOM of the page. | 
                                         attribute 
                                        
                                        
                                        bindable 
                                        
                                     | 
                                    True | |
| InnerText | String | Gets or sets the inner text of the HTML element. | 
                                         attribute 
                                        
                                        static value 
                                        bindable 
                                        
                                     | 
                                    null | |
| Mode | DateTimePickerType? | Gets or sets whether you want the user to pick only date, only time, or both date and time. | 
                                         attribute 
                                        
                                        static value 
                                        
                                        
                                     | 
                                    DateTime | |
| SelectedDate | DateTime? | Gets or sets the date selected in the control. | 
                                         attribute 
                                        
                                        
                                        bindable 
                                        
                                     | 
                                    null | |
| Visible | Boolean | Gets or sets whether the control is visible. | 
                                         attribute 
                                        
                                        
                                        bindable 
                                        
                                     | 
                                    True | 
Events
| Name | Type | Description | |
|---|---|---|---|
| Changed | Command | Gets or sets the command that will be triggered when the control text is changed. |