Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-datepicker should have option to select year and month #4251

Closed
manishbafna opened this issue Aug 20, 2015 · 166 comments
Closed

md-datepicker should have option to select year and month #4251

manishbafna opened this issue Aug 20, 2015 · 166 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: enhancement
Milestone

Comments

@manishbafna
Copy link

If we have to select future of past dates, (date of birth of something), it is difficult to scroll up and down. Should have selection of year and month.

@manishbafna manishbafna changed the title Datepicker should have option to select year and month md-datepicker should have option to select year and month Aug 20, 2015
@knvpk
Copy link

knvpk commented Aug 20, 2015

I thought month selecting is done by scrolling, but i dont know that year selecting is present.

@manishbafna
Copy link
Author

Year and month selection will be important if we want to select past or future dates.

@kamarouski
Copy link

+1. Imagine using datepicker to select birthday date.

@raunakpsingh
Copy link

+1 Its tedious to go back a few years

@ThomasBurleson ThomasBurleson modified the milestone: 0.12.0 Sep 2, 2015
@dohomi
Copy link

dohomi commented Sep 2, 2015

+1, would be great if the behaviour of the selection would come closer to the specs:
https://www.google.de/design/spec/components/pickers.html#pickers-date-pickers
There you can select fast between years and months, currently the scrolling behaviour isn't catchy and intuitive for a user.

@dsbaars
Copy link

dsbaars commented Sep 3, 2015

So why is this one left open, and my issue #4216 closed @jelbourn ?

@Pelu2k12
Copy link

Pelu2k12 commented Nov 3, 2015

+1

@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc3, 1.0-rc4 Nov 7, 2015
@kpgarrod
Copy link

kpgarrod commented Nov 9, 2015

+1

@ThomasBurleson ThomasBurleson removed this from the 1.0-rc4 milestone Nov 16, 2015
@stanslaughter
Copy link

Strangely, you can currently scroll up and down to change months.

For some reason they tied it to the mouse wheel instead of using up/down
arrows with a mouse click.

On Thu, Jun 9, 2016 at 12:31 PM, Mario Mol notifications@github.com wrote:

My biggest problem with that component is that users are complaining that
can't do the scroll up/down to change months.

And this can happen as well when click on the year (it shows another
screen to scroll up/down).

Is that possible to have a arrow down or up that when click makes the
scroll up/down ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4251 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AKBKe5u9_HWjmsDW1LWwpyVIj5KlM7sYks5qKE3_gaJpZM4Fu4MZ
.

Stan Slaughter
Senior Web Developer
stan.slaughter@hodes.com

------------ Our Legal Fees At Work -----------------------------------
This communication and its contents are confidential and may contain
protected intellectual property or other information protected from
disclosure. If you are not the intended recipient you may not read, copy,
distribute or use this information. If you have received this
communication or its contents in error, please notify Findly immediately by
replying to this message and then delete this communication and its
contents from your system.

@simonshawca
Copy link

simonshawca commented Jun 12, 2016

SOLUTION: copy the js from here:
https://material.angularjs.org/latest/angular-material.min.js

@mariohmol
Copy link

@stanslaughter : I dont think that using just scroll is a goode solution.. we have to remember that some users do know how to use scroll or do not have a mouse with a wheel.. its always good to have a alternative way.. like a icon that can be clicked to change up/down

@Loubot
Copy link

Loubot commented Jun 30, 2016

+1 Badly need this option

@barryvdh
Copy link
Contributor

barryvdh commented Jul 1, 2016

But the year is still not easy to scroll? And it still doesn't match https://material.google.com/components/pickers.html#pickers-usage which does have a select for the year.

@mariohmol
Copy link

months and years still scrolling,,, please just put a arrow.. the same that we have in specification of google material as @barryvdh showed

@m0ngr31
Copy link

m0ngr31 commented Jul 19, 2016

This seems to work on the demos page, but doesn't seem to be working for me. Is it running a newer version of ngMaterial?

@Naxus28
Copy link

Naxus28 commented Jul 20, 2016

I am using the datepicker with min and max dates. Min date is set to 120 years ago (from current date). My issue is that when I click the mont/year to be able to scroll to previous dates the scrolling can't get passed 2006. If I scroll to previous years without clicking the month/year it works fine though. I updated the library like 20 days ago.

@crisbeto
Copy link
Member

@Naxus28 that should be have been fixed last week via #8987.

@Naxus28
Copy link

Naxus28 commented Jul 20, 2016

@crisbeto This is the version I am using as per bower list reference: 1.1.0-rc4-master-f9738f5 (I believe this is the latest). Should the fix be working for this version?
I just checked the datepicker code pen and it is not working there either if max date is present.

Our client complained the year scrolling is not working so we will be looking into a different datepicker solution unless this issue will be fixed soon. Would you have an estimate when this issue will be fixed?
Thanks much.

@crisbeto
Copy link
Member

1.1.0-rc4-master-f9738f5 from Bower doesn't seem to have the fix. I'm not sure when the Bower build was last updated.

@Naxus28
Copy link

Naxus28 commented Jul 20, 2016

@crisbeto: bower install angular-material#master --save did the job. Thank you.

@mtpultz
Copy link

mtpultz commented Jul 21, 2016

Is there a way to open the date picker directly to year/month view there doesn't appear to be an example of this in RC5, see uploaded image. Users don't appear to understand they can click the year begin scrolling quickly backwards to their date of birth.

image

@crisbeto
Copy link
Member

Not at the moment @mtpultz, but it sounds reasonable. Can you make an issue for it?

@mariohmol
Copy link

and in normal calendar.. the year clickable is not something easy to get.. would be better to have a icon with the year as well?

@crisbeto
Copy link
Member

crisbeto commented Jul 21, 2016

I've tried playing around with a chevron/arrow icon next to the month name, but it didn't look good and wasn't particularly obvious that it's clickable. I'm open to suggestions on how to do it better, though @mariohmol

@mariohmol
Copy link

what about this icon in the month/year https://design.google.com/icons/#ic_keyboard_arrow_down ..

the same arrow that you have when you have the date showin.. you can put in month/year...

@mtpultz
Copy link

mtpultz commented Jul 22, 2016

Hi @crisbeto I added a feature request to have the md-date-picker field open at the year/month view (#9111) to make fields like date of birth easier and faster for users to fill in.

@crisbeto
Copy link
Member

@mariohmol I'm not sure it's obvious that it goes into another view. I think an arrow like that looks like it would scroll down instead.

@mariohmol
Copy link

@Outflank-Australia
Copy link

Just thought I'd share this solution to make it clearer that the month headers are actually clickable. The chevron that has been added is white on a white background for me...

To add an instruction between the calendar header and the calendar itself, use the following CSS or something similar:

.md-datepicker-calendar{
&::before{
margin-left: 5px;
font-size: 10pt;
font-weight: bold;
content: 'Click month headers to open year view';
}
}

Unfortunately, it will still be there when the year view is open, but it's probably still a better user experience than users scrolling and scrolling through years worth of months at a time.

@binhle410
Copy link

Great, it s been a year and it looks like the feature is still ..... pending ?

@robert-king
Copy link

robert-king commented Oct 15, 2017

a date of birth picker would be useful as a separate component.
The reason it should be separate is because for historical dates we don't care about the day of the week.
For booking flights etc you might wanna know if it's a saturday or friday flight etc.

@angular angular locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: enhancement
Projects
None yet
Development

No branches or pull requests