

Show HN: Made my own date picker for AngularJS - mobinni
https://github.com/mobinni/material-date-picker

======
fougerejo
One month ago I tried to find a nice datepicker directive for angular.
"tried". Couldn't find one that wasn't broken somewhere. Ended up using the
angular-ui one, and spent hours and hours patching the brokeness (options not
being taken into account, dates needed to be formatted for the initialisation,
etc).

That's where I realised that even an active ecosystem as the angular one is
not enough to produce quality libraries/modules for basic stuff as a
datepicker..

~~~
kagamine
I'm actually relieved to find out it isn't just me and that others have been
frustrated by this too.

My boss thinks I'm an idiot because I struggled with ui-datepicker in angular
(being used in a search field). I had to over-explain that it is broken and
still noone believes me when I tell them that the Jenkins build gives a
different result from the same build but on localhost.

The second time around went better as I was forewarned, but then I had to have
2 datepickers (from and to dates) and that broke it scope-wise.

~~~
Bahamut
It should be mentioned, the UI Bootstrap one has a lot of fixes in master
currently that addresses the issues - we are close to the 0.13.0 release
(after work by a new core team that was assembled a month and a half ago),
which should address the problems with Angular 1.3 present in 0.12. Angular
1.4 compatibility should be quick from there, along with massive performance
improvements in 0.13.1.

------
buremba
It's actually shame that we're already in 2015 and html date inputs are not
standardized. [http://caniuse.com/#feat=input-
datetime](http://caniuse.com/#feat=input-datetime)

~~~
mobinni
Exactly what I thought, and even the browsers that can use it, it's not ideal
to customize

------
arxpoetica
We built one recently for my company using Ractive.js and moment.js.
Suprisingly, it was relatively easy to do (as far as working with
date/time/timezone goes).

------
fougerejo
Missing a link to a demo somewhere on the github page :)

~~~
mobinni
will add :) right now it was a local demo

~~~
gberger
Make it into a gh-pages demo :)

~~~
mobinni
Was planning to :D looking it up now

~~~
mobinni
[http://mobinni.github.io/material-date-
picker/example](http://mobinni.github.io/material-date-picker/example) added!

~~~
epmatsw
I'm getting the system default font on the dates in the selector in Firefox on
the example. Other than that, it looks really nice!

------
uptownhr
I really wish you can also add in a time picker on here. I don't understand
how most datepickers choose not to include a time picker as well.

~~~
uptownhr
Sorry, let me knot discredit the nice date picker. I just wish you can add the
time picker as well :). I'd definitely use it!

------
SchizoDuckie
It's a shame that in 2015 we still need to implement datepickers from scratch.
Kudo's on your effort :)

~~~
velox_io
I agree, this sort of stuff (especially dialogues in Angular+Bootstrap) is
still way too painful.

Really hope Angular 2.0 fixes some of this madness.

~~~
atom-morgan
When you say dialogues are you referring to modals? If so, I'm glad I'm not
the only person who has struggled with this. It took me a lot longer than
expected just to get a modal working correctly in Angular. I felt
stupid...like I was missing something.

~~~
velox_io
> I felt stupid...like I was missing something.

Angular does that to people. :)

I started writing a library for dialogues (modal window, prompt, alert &
confirmation), but stopped as it felt like re-inventing the wheel.

Maybe such a library is needed after all..

------
10dpd
Unfortunately this is completely inaccessible - try using the picker using
tab, space, enter and arrow keys.

------
flavj
Looks good! Have you considered doing a datetime picker too?

I have not been able to find one using MD.

~~~
mobinni
I have thought about it, but I just haven't had the time to implement it, I'll
put it on the features list.

------
nickik
Its a shame something like a date picker needs to be framework specific.

~~~
mobinni
Well it was a project specific feature I worked on that I was allowed to open
source, that's why it's framework specific. I would like to port it to
vanillaJS, but even then it wouldn't fit the requirements of many MV* cultures

------
lyschoening
It looks nice enough, but it's not Material Design.

[http://www.google.com/design/spec/components/pickers.html](http://www.google.com/design/spec/components/pickers.html)

~~~
afandian
Why should it be?

~~~
mobinni
I think what he means it doesn't comply with the Android implementation. At
first I wanted to make it like that, but it didn't seem like it would comply
with UX of websites.

------
M8
Which AngularJS of two?

PS: looks nice!

~~~
mobinni
Right now it works on 1.2.28 and up. Thanks! Much appreciated.

