Home     About PeterBlum.com     Policies     Download a Licensed Product     Newsletter
Peter's Date and Time
Calendar Control
Back

The Calendar control initially appears to be like the native Calendar control provided with ASP.NET. But it goes in a new direction: client-side operation. The calendar fills in each month and manages the current selection using client side JavaScript that gives the user a faster, more interactive experience. It also means that you don’t require a post back just to select a date or change the month. Calendar can be included in your data entry forms and only post back when the user submits the form. That's just the start. Here are the features of this control.


Product Features

The extensive feature list is shown below. Test the features yourself in the Demos provided. This highly customizable control has well over 200 properties.

Appearance

Other Features

  • Supports Databinding your date value to the control.
  • Impose date range limits so the user is compelled to enter a date within the range. Dates outside the range are unselectable. The MonthYearPicker and the month movement buttons all respect these limits.
  • All Peter's Date and Time controls use the System.Globalization.CultureInfo object to determine the extact format. So they are fully localizable.
  • Optionally post back when the user changes the selection or the month viewed.
  • ASP.NET 2.0 users can optionally use callbacks (AJAX type requests) to update the contents of the date cells when the month view changes.
  • Can update another control through a client side script that you provide or even a simple ID to the other field, if that field is a Label or TextBox.
  • Can be used as a popup when you select the PopupCalendar control.
  • Javascript programmers can use several published methods to interact with the control.

Fancy Demo

Previous Year Previous Month
Next Month Next Year
April 2017 - May 2017
April 2017
 SuMoTuWeThFrSa
132627282930311
142345678
159101112131415
1616171819202122
1723242526272829
1830123456
May 2017
 SuMoTuWeThFrSa
1830123456
1978910111213
2014151617181920
2121222324252627
2228293031123
2345678910
Today Clear Show

The ASP.NET markup for this demo:
<des:Calendar ID="Calendar9" runat="server" 
   AutoFormatYearChangeButtonPositions="Recommended"
   WeekendBackground="Beige" FocusBorderColor="DarkGoldenrod"
   WeekRowsCellSpacing="2" ShowWeekNumbers="True" 
   MultiMonthColumnCount="2" DayNameFormat="FirstTwoLetters" >
   <PopupMonthYearPicker>
      <MonthYearPicker Format="FewYears" />
   </PopupMonthYearPicker>
   <TodayCommand ShowField="FooterRow1" RegionInRow="Right" />
   <ClearCommand ShowField="FooterRow1" RegionInRow="Right" />
   <ShowSelectionCommand ShowField="FooterRow1" RegionInRow="Right" />
   <CurrentDateLabel ShowField="FooterRow1" RegionInRow="Center" />
</des:Calendar>


Back