Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Calendar & Date Picker control in WPF?

Difference between Calendar & Date Picker control in WPF? Is there any criteria of choosing the either of them?

like image 521
WPFcitizen Avatar asked Jul 19 '12 21:07

WPFcitizen


People also ask

What are the different types of calendars?

Calendars fall into four types: lunisolar, solar, lunar and seasonal. Most pre-modern calendars are lunisolar.

What is the difference between the two calendars?

The main difference between Julian and Gregorian calendars is that an average year in Julian calendar is 365.25 days while an average year in Gregorian calendar is 365.2425 days. Gregorian calendar is the normal calendar we currently use to determine the date. Julian calendar was used from 46 B.C to 1582.

What is the main difference between the Julian and Gregorian calendars?

Difference between Julian and Gregorian calendar An average year in the Julian calendar is 365.25 days, while an average year in the Gregorian calendar is 365.2425 days. Also, there is a leap year every four years in the Julian calendar.

What is the difference between calender and calendar?

Fun fact: People also used “calenderer” to describe the person who uses the machine. They eventually separated the machine “calender” from the time-related “calender” by replacing the “-er” with “-ar,” an element that means “pertaining to.” As a result, you must always use “calendar” to correctly spell the word.


1 Answers

Per the DatePicker documentation:

The DatePicker control allows the user to select a date by either typing it into a text field or by using a drop-down Calendar control.

Many of a DatePicker control's properties are for managing its built-in Calendar, and function identically to the equivalent property in Calendar. [snip] For more information, see Calendar.

The Calendar links in that documentation lead directly to the WPF Calendar control, so...

From my understanding, the DatePicker is essential a control that contains a calendar that is not visible until the user clicks on the drop-down, while the calendar is always visible, unless you provide additional markup and code to achieve the same effect.

So you'd use a calendar when you want a full calendar visible on the page at all times, and a DatePicker when you want something more compact.

When using it to select dates, personally, I'd always choose the DatePicker unless I had a reason to display the calendar. For example, if I were creating an app that lets me enter my birthday a s a part of the registration process, I'd use a DatePicker.

I might use the Calendar in a schedule app, or an appointment calendar. Such an app may have additional data displayed in each day, representing appointments or scheduled shifts. IN that case, I'd want it always visible.

But really, which to use is a per-app design decision.

like image 117
David Avatar answered Oct 16 '22 08:10

David