-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Datepicker] Action button #329
Comments
@CnxAtanasIliev Do you have any good ideas? |
@JonkiH Would you mind giving some example to what you want to achieve as I dont understand quite well what the desired functionality needs to be. In general you should be able to define your own buttons in the actions element and dont have to necessarily use the built-in ones. This is basically ported functionality from Angular Material itself. I dont mind expanding it more, but I dont understand the ask here. As for the changed event in general it is tied to the buttons being there, because if they are not used it automatically closes the overlay and emits the event. |
What we are trying to do is create today button but when we do we loose the normal functionality. When you have no action button you can press day and then that day is chosen. We are trying to add bottoms that have custom functionality with out loose the normal functionality. |
I think you can get the methods from the <mtx-datetimepicker #datetimepicker>
<mtx-datetimepicker-actions>
<button mat-button (click)="datetimepicker.close()">Close</button>
</mtx-datetimepicker-actions>
</mtx-datetimepicker> |
@nzbin @JonkiH One thing that comes to my mind that can be done is this: I kind of get what @JonkiH wants to do I think. Basically he wants to have a button 'Today', which focuses the current day (for example), but doesn't want to add an Apply button necessarily to handle the selection with a second action. Thoughts? |
@CnxYankoNikolov it exactly what I want! If it is possibility to disable the the normal function (like it is to day, where if you have action buttons it disable the option to click day and it is chosen) with some input then also comes the possibility to create custom functionality. For example someone want to create button that should chose always next Monday or day one week from now. Today (Idag witch is custom functionality) works for us but we need also to have Apply (Verkställ) but we would like to skip him since the user now need to chose the day and then press Apply. |
@nzbin If you are okay with the approach I think its fairly easy to do. |
Just wondering if there is an possibility to have some kind of overwrite so when we are using action button it would still send event when some date is chosen in the date picker,
This could open up the possibility to have custom functionality in action button area of the date picker.
insted of this check
and this
to have some kind of variable that is possible to overwrite. to open up this possibility, this work except when we chose date in the calendar because there is no event that happened anymore
Best regards
Jónki
The text was updated successfully, but these errors were encountered: