How to add datepicker to angular -meteor?
I've just started experimenting with angular-meteor , which feels good but strange at the same time. What I'm uncomfortable with is that everything is done with packages and I'm not sure how much I can do manually.
So, I followed the tutorial until step 9 , which made a simple party planning website. Now I want to add a datepicker so that the sides have dates as well. For this I want to use something like Bootstrap Datepicker or angular-datepicker or this Meteor Datepicker , but I'm not sure which one to choose and how to do it.
Do I need to install everything in meteor using meteor packs? Should I use a gazebo? Can I manually inject these libraries using the normal method <script src="">
? And which one would be the most appropriate?
All advice is appreciated!
source to share
Since the impact of this feature is limited to the presentation layer, how you choose to install / integrate your datepicker is largely a matter of taste.
- You can go for the meteorite package and simplify the integration (given that the package has no conflicting dependencies with your project like a router with a router through a router and a router) and updates (assuming the package is seriously managed and maintained)
- If you decide to go with a gazebo or a different package manager than meteorite (or not, and just download the sources, for that matter), you'll need to integrate the library yourself (either through a custom package or directly into
client/lib
) and update it manually. But you will get "official" updates from the actual maintainer libraries.
To keep things simple, I would personally go with rajit: bootstrap3-datepicker . This seems to be properly supported (last committed a couple months ago) and I have enough installations for my taste:
$ meteor add rajit:bootstrap3-datepicker
Then in my template:
<label>Date</label>
<input type="text" class="form-control" id="my-datepicker" ng-model="newParty.date">
And in PartiesListCtrl
I would install the datepicker using:
$('#my-datepicker').datepicker();
If you do the integration yourself, here are a couple of helpful SO links here and here and here.
source to share