Yesterday I got a task to attach some datepicker to inputs. Datepicker must be bounded with input, prohibited to select past date and date after 3 months from today. And of course I meant that it will easy. Case: no bootstrap attached, no jquery-ui attached, es6 webpack import, stylus, needed to be styled as site design.
I realized that not so much plugins exist.
My datepicker markup (bemto pug mixin) was looking as
When I found PickMeUp, I said “yeah, it what I want”. But after use I had several problems…
First I had to convert sass to stylus, if you want a solution see my gist
PickeMeUp always using body as container. If your page has fixed top navbar layout you will got a problem with riding calendar. It doesn’t look fine. The solution from developer I found in issue #111 (use flat and shut up). It seemed okay but calendar has no activity in flat mode.
I want to bound it to input and trigger it by clicking whole datepicker div with icon. In flat mode by default you cant.
So I did modify the mixin
And do the total code in simple ES6 with MomentJS/jQuery/Vanilla mix