xxxxxxxxxx
// convert Javascript Date to HTML Input
var now = new Date();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var hour = ("0" + (now.getHours())).slice(-2);
var min = ("0" + (now.getMinutes())).slice(-2);
var today = now.getFullYear() + "-" + month + "-" + day + "T" + hour + ":" + min;
xxxxxxxxxx
<label for="start">Start date:</label>
<input type="date" id="start" name="trip-start"
value="2018-07-22"
min="2018-01-01" max="2018-12-31">
xxxxxxxxxx
var now = new Date();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var today = now.getFullYear() + "-" + month + "-" + day;
xxxxxxxxxx
<form>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
</form>
xxxxxxxxxx
using DevExpress.XtraEditors;
// initialize a new XtraInputBoxArgs instance
XtraInputBoxArgs args = new XtraInputBoxArgs();
// set required Input Box options
args.Caption = "Shipping options";
args.Prompt = "Delivery date";
args.DefaultButtonIndex = 0;
args.Showing += Args_Showing;
// initialize a DateEdit editor with custom settings
DateEdit editor = new DateEdit();
editor.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.TouchUI;
editor.Properties.Mask.EditMask = "MMMM d, yyyy";
args.Editor = editor;
// a default DateEdit value
args.DefaultResponse = DateTime.Now.Date.AddDays(3);
// display an Input Box with the custom editor
var result = XtraInputBox.Show(args).ToString();
// set a dialog icon
private void Args_Showing(object sender, XtraMessageShowingArgs e) {
e.Form.Icon = this.Icon;
}