Date25
Date25 is a flexible date and time input control built on top of
jQuery DateRangePicker and Bootstrap DateTimePicker.
It supports date selection, date & time selection, time-only input,
and date-range selection with optional validation and sizing.
Key Features
- Supports date, time, datetime, and date range selection
- Min and max date validation
- Automatic formatting (DD-MMM-YYYY)
- Responsive sizing options
- Required field indicator
Supported Date Types
- Date – Select a single date
- DateTime – Select date with time
- DateRange – Select a start and end date
- Time – Select time only
Size Options
- S1 – 50px
- S2 – 100px
- S3 – 150px
- S4 – 200px
- S5 – 250px
- Max – 100% width
- Auto – Automatic width
Properties
- ControlId – Unique identifier for the input control
- DateType – Type of date input (Date, DateTime, DateRange, Time)
- Label – Label text displayed above the control
- IsRequired – Displays a red asterisk (*) if set to true
- MinDate – Minimum selectable date
- MaxDate – Maximum selectable date
- ReturnValue – Initial value for the control
- Size – Width of the control
Date Control Example
Date25.Properties date = new Date25.Properties
{
ControlId = "OrderDate",
Label = "Order Date",
DateType = Date25.DateType.Date,
IsRequired = true,
Size = Date25.Size.S3
};
@Date25.GetHtml(date)
DateTime Control Example
Date25.Properties dateTime = new Date25.Properties
{
ControlId = "CreatedOn",
Label = "Created On",
DateType = Date25.DateType.DateTime,
ReturnValue = "01-Jan-2025 10:30 AM",
Size = Date25.Size.S4
};
@Date25.GetHtml(dateTime)
Time Picker Example
Date25.Properties time = new Date25.Properties
{
ControlId = "StartTime",
Label = "Start Time",
DateType = Date25.DateType.Time,
Size = Date25.Size.S2
};
@Date25.GetHtml(time)
Date Range Example
Date25.Properties range = new Date25.Properties
{
ControlId = "ReportRange",
Label = "Report Period",
DateType = Date25.DateType.DateRange,
ReturnValue = "01-Jan-2025;31-Jan-2025",
Size = Date25.Size.Max
};
@Date25.GetHtml(range)