Android Guides | Samples

Android.Widget.DatePicker Class

Provides a widget for selecting a date.

See Also: DatePicker

Syntax

[Android.Runtime.Register("android/widget/DatePicker", DoNotGenerateAcw=true)]
public class DatePicker : FrameLayout

Remarks

Provides a widget for selecting a date.

When the NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#DatePicker_datePickerMode attribute is set to spinner, the date can be selected using year, month, and day spinners or a CalendarView. The set of spinners and the calendar view are automatically synchronized. The client can customize whether only the spinners, or only the calendar view, or both to be displayed.

When the NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#DatePicker_datePickerMode attribute is set to calendar, the month and day can be selected using a calendar-style view while the year can be selected separately using a list.

See the Pickers guide.

For a dialog using this view, see DatePickerDialog.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.DatePicker are listed below.

See Also: FrameLayout

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
CalendarViewCalendarView. Returns the CalendarView used by this picker.
CalendarViewShownBoolean. Returns whether the CalendarView is shown.
DateTimeDateTime.
[read-only]
DayOfMonthInt32.
FirstDayOfWeekInt32. Gets the first day of week.
MaxDateInt64. Gets the maximal date supported by this DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone.Default time zone.
[read-only]
MaxDateTimeDateTime.
MinDateInt64. Gets the minimal date supported by this DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone.Default time zone.
[read-only]
MinDateTimeDateTime.
[read-only]
MonthInt32.
SpinnersShownBoolean. Returns whether the spinners are shown.
[read-only]
YearInt32.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Init(Int32, Int32, Int32, DatePicker+IOnDateChangedListener)
Initialize the state.
UpdateDate(Int32, Int32, Int32)
Update the current date.