Class SfDatePicker
A customized view that allows date picking. ​
Inheritance
Namespace: Syncfusion.Android.DataForm.Editors
Assembly: Syncfusion.SfDataForm.Android.dll
Syntax
public class SfDatePicker : ViewGroup
Constructors
SfDatePicker(Context)
Initializes a new instance of the SfDatePicker.
Declaration
public SfDatePicker(Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | Context of the view |
SfDatePicker(Context, IAttributeSet)
Initializes a new instance of the SfDatePicker.
Declaration
public SfDatePicker(Context context, IAttributeSet attributeSet)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | Context of the view |
| Android.Util.IAttributeSet | attributeSet | Required attributes set |
SfDatePicker(Context, IAttributeSet, Int32)
Initializes a new instance of the SfDatePicker.
Declaration
public SfDatePicker(Context context, IAttributeSet attributeSet, int defStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | Context of the view |
| Android.Util.IAttributeSet | attributeSet | Required attributes set |
| System.Int32 | defStyle | Default style attribute. |
SfDatePicker(IntPtr, JniHandleOwnership)
Initializes a new instance of the SfDatePicker.
Declaration
protected SfDatePicker(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IntPtr | javaReference | Java Native Interface object reference. |
| Android.Runtime.JniHandleOwnership | transfer | A Android.Runtime.JniHandleOwnership indicating how to handle. |
Properties
Date
Gets or sets the date.
Declaration
public Nullable<DateTime> Date { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.DateTime> |
Enabled
Gets or sets a value that indicates whether SfDatePicker is enabled.
Declaration
public override bool Enabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Format
Gets or sets the date format.
Declaration
public string Format { get; set; }
Property Value
| Type |
|---|
| System.String |
Hint
Gets or sets the hint to be displayed in date picker.
Declaration
public string Hint { get; set; }
Property Value
| Type |
|---|
| System.String |
MaximumDate
Gets or sets the maximum date.
Declaration
public DateTime MaximumDate { get; set; }
Property Value
| Type |
|---|
| System.DateTime |
MinimumDate
Gets or sets the minimum date.
Declaration
public DateTime MinimumDate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.DateTime | The MinimumDate. |
TextColor
Gets or sets the text color of the picker.
Declaration
public Color TextColor { get; set; }
Property Value
| Type |
|---|
| Android.Graphics.Color |
Methods
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
FindFocus()
Find the view in the hierarchy rooted at this view that currently has focus.
Declaration
public override View FindFocus()
Returns
| Type | Description |
|---|---|
| Android.Views.View | The view |
OnDetachedFromWindow()
Notifies when view is detached from window.
Declaration
protected override void OnDetachedFromWindow()
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Layout the children in the view. Derived classes with children should override this method and call layout on each of their children.
Declaration
protected override void OnLayout(bool changed, int l, int t, int r, int b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | changed | True if the size of the view is changed, otherwise false. |
| System.Int32 | l | Left position, relative to parent |
| System.Int32 | t | Top position, relative to parent |
| System.Int32 | r | Right position, relative to parent |
| System.Int32 | b | Bottom position, relative to parent |
OnMeasure(Int32, Int32)
Raises the measure event.
Declaration
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | widthMeasureSpec | Width measure spec. |
| System.Int32 | heightMeasureSpec | Height measure spec. |
SetPadding(Int32, Int32, Int32, Int32)
Set padding for the child view.
Declaration
public override void SetPadding(int left, int top, int right, int bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | left | Left position, relative to child |
| System.Int32 | top | Top position, relative to child |
| System.Int32 | right | Right position, relative to child |
| System.Int32 | bottom | Bottom position, relative to child |
Events
DateChanged
Occurs when date value is changed.
Declaration
public event EventHandler DateChanged
Event Type
| Type |
|---|
| System.EventHandler |