Giter Club home page Giter Club logo

angular-bootstrap-datepicker's Introduction

angular-bootstrap-datepicker - AngularJS directives for the bootstrap-datepicker

At the moment, only the "Component" type is supported.


Demo

Here's a working jsfiddle A more dynamic demo of all the options is available for the original bootstrap-datepicker.

Installation

Installation is easy, jQuery, AngularJS and Bootstrap's JS/CSS are required. You can download angular-bootstrap-datepicker via bower: bower install angular-bootstrap-datepicker

When you are done downloading all the dependencies and project files the only remaining part is to add dependencies as an AngularJS module:

angular.module('myModule', ['ng-bootstrap-datepicker']);

You also need to include these files:

<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="angular-bootstrap-datepicker.css" />

<script src="jquery.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<script src="angular.js"></script>
<script src="angular-bootstrap-datepicker.js" charset="utf-8"></script>

Make sure you use charset="utf-8" in your script tag if your browser (or those of your users) is displaying characters wrong when using another language.

Settings

To use the directive, use the following code :

<input type="text" ng-datepicker ng-options="datepickerOptions" ng-model="date">

ng-datepicker : Indicates you want your input as a date picker.

ng-options : Object of the controller scope containing the options for your date picker.

ng-model : Variable of the controller scope to store the date. The date is currently store as a string, formatted according to the one set in ng-options.

For a working example, see https://github.com/cletourneau/angular-bootstrap-datepicker/blob/master/example/demo.html

angular-bootstrap-datepicker's People

Contributors

cletourneau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular-bootstrap-datepicker's Issues

Only a few configurations are available

var validOptions = ['startView', 'minView', 'minuteStep', 'dropdownSelector'];

how your define the startDate or all other properties from the native bootstrap-datepicker.

angular-bootstrap-datepicker

Version 2.0
When we select date from date picker today's date is not getting populating,yesterday day is populating

tab issue

i have used 4 datepicker. if i tab over this date picker they are not getting closed automaticaly. i added autoclose but still not working.

Fichier de licence

Le fichier de licence ne contient des 'champ' date et auteur en fin de fichier.
Ils devraient être remplit

cannot get value from ng-model

#6

has fix the choice date bug.

now the question is i cannot get value from ng-model when i bind double or more property,
please fix this bug.
3ks

I have to use bootstrap-datepicker to replace angular-bootstrap-datepicker

<input type="text" class="birtdaypicker autoCombox_row_datepicker" readonly="readonly" ng-model="rang_selected.contents[0].start"/>
<input type="text" class="birtdaypicker autoCombox_row_datepicker" readonly="readonly" ng-model="rang_selected.contents[0].end"/>

ngOptions not working for angular version 1.4.3

Hello, I am using angular-bootstrap-datepicker with Angular js 1.4.3 but it's not working. It's working with Angular-1.0.8 as per this demo
http://jsfiddle.net/cletourneau/kGGCZ/

-> With Angular 1.4.3 it's give error message like,
Error: [$compile:ctreq] Controller 'select', required by directive 'ngOptions', can't be found!
http://errors.angularjs.org/1.4.3/$compile/ctreq?p0=select&p1=ngOptions

And at the time of debugging i found that ngOption is undefined in bootstrap-datepicker js..

I exactly follow all the step from this http://jsfiddle.net/cletourneau/kGGCZ/ . just changed angular version.

Translating date.toString to textbox

Hi

Can you help how to set a Portuguese date string configuration? I can see the main calendar in PT when I included the translation pt.js file but when I select the time and date, the result is still in US version

Thank you

Fix on 1.5.3

I'm remove ngOption and add $(element) in directive ==&gt; $(element).datepicker()...

Doesn't correctly set date when input blank Angular 1.2.4

I have JSFiddle that shows this issue http://jsfiddle.net/9wmDp/.

The issue is that when the input is empty and you select any date other current date then the date in the input is set to the current date.

For example if today is 2014-01-13 and I select 2014-01-16 from the datepicker then the input is updated with 2014-01-13 instead of the proper value of 2014-01-16.

--> New maintained repository <--

Hey folks,

as I was struggling with this repository and it seems to be no longer maintained (last release is more than three years ago) I build a new angular wrapper from scratch for @eternicode's awesome bootstrap-datepicker.

It works smoothly with the current angular version (ng-options is now dp-options) and the timezone problem (aka the date before the selected one is shown) is fixed.
Plus: There is a provider to globally set the options for all your datepickers and single text inputs as well as embedded / inline datepickers are supported too now 👍

The new package is already available via bower and npm as ng-eternicode-datepicker.
Check out the repository fkammer/ng-eternicode-datepicker and let me know if you miss any features.

Looking forward to see your comments and PRs 😺

Date, Month, Year choose the previous one

When you choose a day, a month, a year it returns always the previous one, this is just because it returns UTCDay, UTCMonth, when the date is not created in non UTC.

Locale format Parsing

The parsing of locale files is not the standard one.

The standard locale has this syntax:

"fullDate": "EEEE, d. MMMM y",
"longDate": "d. MMMM y",
"medium": "dd.MM.yyyy HH:mm:ss",
"mediumDate": "dd.MM.yyyy",
"mediumTime": "HH:mm:ss",
"short": "dd.MM.yy HH:mm",
"shortDate": "dd.MM.yy",
"shortTime": "HH:mm",

The datepicker right now use 'm' to month number, 'MM' for month short description, 'MMMM' for month long description.

This is not correct, because the standard has just 'MM' for short date and 'MMMM' for long date and ´m' is just for minutes.

Thanks

Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.