Irwsoft Web Control

DateTimePicker
Brief Information
DescriptionDate and time control to input DateTime data type.
FeaturesAccept DateTime or Date data type and allow null / empty data.
Red shadow higlight when data changed.
DataFormat and auto validation.
DateTimePicker control
DateTimePicker control


The DateTimePicker control is input control for DateTime or Date data type and as a helper control to provide date-time data to other control. This control accept one property only with Date/Time data type. This control allows you to set null data by deleting existing data.

Note : The different with InputDateTime is that it can be used as helper control to provide date-time data to other control.


DateTimePicker as Input-Helper

DateTimePicker as input helper for Date/Time data-type

All IWC input control designed using MVVM pattern which mean you can have a data-model class representing a domain/table, but ofcourse you can still using classic CRUD programming without any data-model. You can use simple C# class, Irwsoft Data Framework, Entity Framework, Linq to Sql or other .NET ORM. Then set its data-source and some properties to bind.

Example : Input DateOfBirth data of Person table with DateTimePicker


C# code for Person table

// 1) Sample code for Person table
public class Person
{
     // 2) The columns of Person table.
     public int ID { get; set;}
     public string FirstName { get; set;}
     public string LastName { get; set;}
     public GenderType Gender { get; set;}
     public DateTime DateOfBirth { get; set;}   // 3) Input DateOfBirth property of Person.
     public int Age { get; set;}
     public string Address { get; set;}
     public string City { get; set;}
     public string Country { get; set;}
     public string IdentityCardNo { get; set;}
     public string BioData { get; set;}
     public string PictureUrl { get; set;}
}

ASPX code for DateTimePicker

// 1) Defines the DateTimePicker control
<irw:DateTimePicker ID="DTP1" runat="server" SkinStyle="SimpleGrey">
     <DataPropertyNames>  // 2) Defines a property to bind inside DataPropertyNames tag
          <irw:DataPropertyName Name="DateOfBirth" DataType="DateTime" />
     </DataPropertyNames>
</irw:DateTimePicker>


Related Topics :


Irwsoft Data Ultimate Edition 4.0 supports data-schema extension (entity framework, linq to sql, simple class, and etc).