material-components / material-web

Material Design Web Components
https://material-web.dev
Apache License 2.0
9.22k stars 882 forks source link

Better dialog customization #5517

Closed shadow-identity closed 6 months ago

shadow-identity commented 7 months ago

Description

We're making our date picker component following Material guidelines, and I was trying to use md-dialog to show the calendar in docked or modal modes. But it does not seem to be possible because of reasons I described below. Generally speaking, the md-dialog lacks of md-menu-like properties and behavior.

Having these issues solved could make it easy to build custom date picker unless it is not released by the material-web project.

asyncLiz commented 7 months ago

Can you describe your use case more? A menu surface popup is the appropriate component to use for use cases like datepicker popups, which have a different accessibility pattern than dialog that addresses those issues.

shadow-identity commented 6 months ago

I thought md-menu should be used only together with md-menu-item. I was wrong, it works perfectly with my custom content. Sorry to bother you.