MaterialDatePicker

A Dialog with a header, MaterialCalendar, and set of actions.

For more information, see the component developer guidance and design guidelines.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Builder<S>
Used to create MaterialDatePicker instances with default and overridden settings
Link copied to clipboard

Properties

Link copied to clipboard
Date picker will start with calendar view.
Link copied to clipboard
Date picker will start with input text view.
Link copied to clipboard
open val inputMode: Int

Functions

Link copied to clipboard
The supplied listener is called when the user cancels the picker via back button or a touch outside the view.
Link copied to clipboard
The supplied listener is called whenever the DialogFragment is dismissed, no matter how it is dismissed.
Link copied to clipboard
open fun addOnNegativeButtonClickListener(onNegativeButtonClickListener: View.OnClickListener): Boolean
The supplied listener is called when the user clicks the cancel button.
Link copied to clipboard
The supplied listener is called when the user confirms a valid selection.
Link copied to clipboard
Removes all listeners added via addOnCancelListener.
Link copied to clipboard
Removes all listeners added via addOnDismissListener.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getHeaderText(): String
Returns the text to display at the top of the DialogFragmentThe text is updated when the Dialog launches and on user clicks.
Link copied to clipboard
Returns an S instance representing the selection or null if the user has not confirmed a selection.
Link copied to clipboard
fun onCancel(@NonNull dialogInterface: DialogInterface)
Link copied to clipboard
fun onCreate(@Nullable bundle: Bundle)
Link copied to clipboard
Link copied to clipboard
fun onCreateView(@NonNull layoutInflater: LayoutInflater, @Nullable viewGroup: ViewGroup, @Nullable bundle: Bundle): View
Link copied to clipboard
fun onDismiss(@NonNull dialogInterface: DialogInterface)
Link copied to clipboard
Link copied to clipboard
open fun onStart()
Link copied to clipboard
open fun onStop()
Link copied to clipboard
Removes a listener previously added via addOnCancelListener.
Link copied to clipboard
Removes a listener previously added via addOnDismissListener.
Link copied to clipboard
open fun removeOnNegativeButtonClickListener(onNegativeButtonClickListener: View.OnClickListener): Boolean
Removes a listener previously added via addOnNegativeButtonClickListener.
Link copied to clipboard
Removes a listener previously added via addOnPositiveButtonClickListener.
Link copied to clipboard
Returns the UTC milliseconds representing the first moment in current month in local timezone.
Link copied to clipboard
Returns the UTC milliseconds representing the first moment of today in local timezone.