Skip to content

Instantly share code, notes, and snippets.

View Yeswanth-JG's full-sized avatar

J Govind Yeswanth Yeswanth-JG

View GitHub Profile
@Yeswanth-JG
Yeswanth-JG / gist:6d10ac92353a8d364b65f77cf36bf36d
Last active April 22, 2016 17:38 — forked from HasAndries/gist:3135128
angularjs directive for bootstrap datepicker : eternicode/bootstrap-datepicker
angular.module('bDatepicker', []).
directive('bDatepicker', function () {
return {
require: '?ngModel',
restrict: 'A',
link: function ($scope, element, attrs, controller) {
options = angular.fromJson(attrs.bDatepicker); //taking options from the element attribute
var defaultOpts = {
format: 'dd/mm/yyyy',
todayHighlight: true