material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.24k stars 3.05k forks source link

[DatePicker] Expose Views or Dialogs #562

Open PaulWoitaschek opened 5 years ago

PaulWoitaschek commented 5 years ago

The current implementation of the date pickers is heavily tied to Fragments. I'd like to use the date picker inside a Conductor controller.

It would be great if you leave it up to the consumer and just expose a regular Dialog instead of tying the implementation on fragments.

guger commented 4 years ago

I'd also like to see the date picker which is used in the dialogs to be a standalone view. This would be really helpful since I'm using the date picker together with a time picker in a customized single dialog.

drchen commented 3 years ago

Hi, do you want/need to use the proposed "date picker views" in XMLs?

If not, we may be able to provide some helper methods to support that. But if you need a totally standalone view, since it requires a huge effort to refactor the current implementation, I'm afraid that this won't be our plan in the near future.

jrichardsen commented 2 years ago

I would like to use a date picker with the Jetpack Navigation Component. Exposing a Dialog would allow me to create a custom DialogFragment() and override onCreateDialog() (which I am already doing, but currently using a DatePickerDialog, which does not look quite as fancy as the Material version :wink: )

If there is another way to join the Navigation Component and MaterialDatePicker together, I'd be thankful for some hints!