Input for ASP.NET WebForms
Defining C1InputDate
Using C1InputDate > Defining C1InputDate

You can define the date pattern through the visual designers, for example, the C1InputDate Smart Tag or the C1InputDate Designer, or programmatically through the C1InputDate object.

When the user edits the date at run time, note the following:

C1InputDate General Properties

The following table lists general properties of the C1InputDate control:

Property Description
Date DateTime value.
DateFormat Date format pattern or date format character (preset character).
Placeholder The Placeholder property determines the text that will be displayed for blank status.
Calendar Determines the Calendar element for a date input.

C1InputDate Format Characters

The C1InputDate format characters are case-sensitive. The following table lists standard format characters:

Preset Pattern Name
d Short date pattern
D Long date pattern
t Short time pattern
T Long time pattern
F Full date/time pattern(short time)
g General date/time pattern (short time)
G General date/time pattern (long time)
U Universal sortable date/time pattern

C1InputDate Format Patterns

The C1InputDate patterns are case-sensitive. The following table lists standard patterns:

Format Pattern Description
d The day of the month. Single-digit days will not have a leading zero.
dd Two-digit day of the month. Single-digit days will have a leading zero.
ddd The abbreviated name of the day of the week.
dddd The full name of the day of the week.
M The numeric month. Single-digit months will not have a leading zero.
MM The numeric month. Single-digit months will have a leading zero.
MMM The abbreviated name of the month.
MMMM The full name of the month.
y The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.
yy The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.
yyyy Four-digit year (0000 through 9999).
h The hour in a 12-hour clock. Single-digit hours will not have a leading zero.
hh The hour in a 12-hour clock. Single-digit hours will have a leading zero.
H The hour in a 24-hour clock. Single-digit hours will not have a leading zero.
HH The hour in a 24-hour clock. Single-digit hours will have a leading zero.
m The minute. Single-digit minutes will not have a leading zero.
mm The minute. Single-digit minutes will have a leading zero.
s The second. Single-digit seconds will not have a leading zero.
ss The second. Single-digit seconds will have a leading zero.
t The first character in the AM/PM designator.
tt The AM/PM designator.

Note: If characters in pattern are enclosed in single quotation marks then these characters are treated as literals. For example, pattern: 'dd:' dd.MM.yyyy for date 03.07.2006 outputs string "dd: 03.07.2006".