Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Open mdPickers in md-dialog #38

Closed
KelvinOm opened this issue Mar 3, 2016 · 26 comments
Closed

Open mdPickers in md-dialog #38

KelvinOm opened this issue Mar 3, 2016 · 26 comments

Comments

@KelvinOm
Copy link

KelvinOm commented Mar 3, 2016

Hi.

How open picker in dialog window without close it?

@asoseil
Copy link

asoseil commented Mar 8, 2016

+1

@alenaksu
Copy link
Owner

alenaksu commented Mar 8, 2016

Unfortunately multiple dialogs at time cannot be opened.
Afaik, Material specs for the pickers are Android focused.

Meanwhile I'll look for a solution, any suggestion would be appreciate :)

@rvarbanov
Copy link

+1

@KelvinOm
Copy link
Author

KelvinOm commented Mar 9, 2016

I know about specs, but datepicker not a dialog:)
What about del «md-dialog» and use something like in Angular Material «md-datepicker-calendar-pane». But u need add show behavior for new block.

@asoseil
Copy link

asoseil commented Mar 9, 2016

@KelvinOm
Copy link
Author

KelvinOm commented Mar 9, 2016

not best usability solution...

@alenaksu
Copy link
Owner

alenaksu commented Mar 9, 2016

I've digged a bit into the "Angular Material" source code. There's an undocumented option for $mdDialog, "skipHide". If you set it to True, the mdDialog service doesn't close other dialogs.

But there's an issue when cancelling a dialog angular/material#6912

I think it will work without any problem after Angular Material team will release version 1.0.6.

@alenaksu
Copy link
Owner

alenaksu commented Mar 9, 2016

Here is a demo of what I was talking about

@KelvinOm
Copy link
Author

KelvinOm commented Mar 9, 2016

thx i try it and we already use 1.0.6 version:)

I found two problems with this approach:

  1. Cancel and clickOutsideToClose close first md-dialog...
  2. How i can set skipHide for DatePicker md-dialog?

@alenaksu
Copy link
Owner

alenaksu commented Mar 9, 2016

As I can see here, current release is 1.0.5

Anyway, for the issue you mentioned, it's exactly what I was talking about. It was fixed with commit 6d39c21, but didn't released yet.

I'll add the skipHide option in the next version of the pickers

@alenaksu alenaksu modified the milestones: 0.6.3, Backlog Mar 9, 2016
@KelvinOm
Copy link
Author

KelvinOm commented Mar 9, 2016

I get 1.0.6 from cdn
http://cdnjs.cloudflare.com/ajax/libs/angular-material/1.0.6/angular-material.min.js
In this fix bug whit md-errors-spacer, critical for me.

thx for great picker! Really looking forward to the next version:)

@rvarbanov
Copy link

What is the status of this issue? What are the plans of making the datepicker working in a dialog?

@alenaksu
Copy link
Owner

@rvarbanov done in version 0.7.0, but require angular material >=1.1-rc1

@rvarbanov
Copy link

@alenaksu it still looks like you are using md-dialog for the datepicker. Are you considering removing the md-dialog?

@alenaksu
Copy link
Owner

@rvarbanov yes it still using md-dialog, but it shouldn't close others anymore. I considered to switch away from md-dialog, but maybe later, when everything will work "quite well" :)

@rvarbanov
Copy link

http://codepen.io/radi/pen/wGzZKx

When you open a datepicker in a dialog it opens under the first dialog. Please see the codepen.

@alenaksu
Copy link
Owner

@rvarbanov make a try without specify the parent option in the dialog

@rvarbanov
Copy link

@alenaksu I am not sure I understand. Would you please elaborate?

@alenaksu
Copy link
Owner

@rvarbanov
Look at this http://codepen.io/alenaksu/pen/NNRQrE

@rvarbanov
Copy link

That worked.

BTW I just noticed that on smaller screens < 599px in the calendar the dates are misaligned with the week days.

screen shot 2016-03-14 at 1 32 15 pm

It looks like a simple CSS fix should resolve that issue.
Let me know if you need to create a new issue just for that?

@alenaksu
Copy link
Owner

@rvarbanov
Ouch! Yes please, create a new issue so I'll remember to fix it :D

@rvarbanov
Copy link

All set!

@dehart
Copy link

dehart commented Dec 21, 2016

@rvarbanov

Angular has changed, skipHide to "multiple"

See here: angular/material#10076

@jimwilde
Copy link

@alenaksu
I updated my version to use 'multiple' instead of 'skipHide' and it's working. Would be good for you to update so this doesn't get overwritten if I have to reinstall my npm dependencies.

@ghost
Copy link

ghost commented Feb 14, 2017

@alenaksu

I updated my version to use 'multiple' instead of 'skipHide' and it's not working.. using angular material 1.1.2...please check the attached codepen...we are in production now and it is causing trouble to lot of users please tell the fix to it

http://codepen.io/Prajwal_Jagadish/pen/ygZodj

@dandanknight
Copy link

dandanknight commented Mar 24, 2017

@Prajwal8 I've had the same issue. The multiple field needs to be in the mdPickers code itself. I previously forked this project to add skipHide and fix a validator issue. I've since updated it to use multiple instead of skipHide. It works fine for me.

You can find it here...

https://github.com/dandanknight/mdPickers.git#master

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants