Using Calendar or Date Controls


Calendar or Date controls, also called date drop downs may seem very simple and would not warrant a page, however as there are hidden elements to using these I thought it worthwhile placing all the information in the one place.

Date SelectionHere is an example of two calendar/date controls on a form. When you click on the drop down portion of the control (the arrow thingy on the right hand side) a calendar of the month is displayed.

The Month Drop-downYou can now see the complete month and at the start and end of the month are greyed out days from the previous and next months. Even though they are greyed they still work. If you click on them the date will be inserted in the display portion – the bit you normally see that is not part of the drop-down area.

You can move around the calendar area using the up and down, left and right arrows. You should be aware that if you use say the up arrow then, when it gets to the top of the screen it will jump back into the previous month. Likewise left and right arrows do the same, except that they snake down through the current month and do not change months until the highlighted cell reaches the greyed dates.

Navigating monthsClicking on the arrows either side of the month at the top of the drop-down area takes you to the previous or next month.

The red square and day will set the calendar to today’s date if you click on that line. If you click on a day to goes to the day and closes the drop down.

When the month drop-down is open there is also a method of changing the year. You do NOT have to scroll back though many months to get to the year you want.

On the example shown click on the year 2011 and you will now see this:

Selecting A YearYou can now scroll up and down the years.

Unfortunately you cannot simply type a year into the box. You can only use the arrows to change the year.

Clicking a date or pressing Enter (Return) will store the selected year and display the calendar drop down for the current month selected.

There are more hidden gems in the calendar box.

The drop down month selectorClick in the month name at the top and you get a drop down list of the months.

Simply click on the month you want to go to.

And there is more.

In the display area, in other words NOT in the drop down, you can click the day, month or year portion and it will be highlighted.

You can now use the up and down arrows to go up and down the values range. These roll round for months and days.

Using the left and right arrow keys you can change the selected area.

Such a versatile little control. Worth a page on it’s own I feel!

Comments policy

Advertisements

Please feel free to leave a reply. (All comments are moderated)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s