M# Tutorials

Learn to build .NET applications with M#. Our step-by-step tutorials will get you up-to-speed rapidly.
If you already know ASP.NET and C#, you can master M# in a week or two.

DateTime element

In this tutorial we will learn how to customize the DateTime control in your forms.

Default control

When you add a DateTime element in your form or when M# generates the form for you, the form contains a text box for editing the date, a dropdown for the hour and another for the minutes.


Calendar control

You can replace the default text box control by a calendar control.


Hour format

The default hour format is "hh tt" but we may want to change it to the 24H format.

To do this change the attribute "Hour format string" to "HH".

Minimum / Maximum

For both hours and minutes you can specify a range, for example working day hours.


For both hours and minutes you can specify an interval, which make easier for the end-user to select a value when there is no default value.

Show controls

For both hours and minutes you can specify whether the control is visible or not, for example if you specified in your entity your property as Date only.