Skip to content
This repository has been archived by the owner on Dec 15, 2017. It is now read-only.

Commit

Permalink
Fixes #61
Browse files Browse the repository at this point in the history
  • Loading branch information
tarruda committed Mar 6, 2013
1 parent 60934ef commit 8e29132
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ Contributions guidelines:
- If it is a new feature, try to add automated tests for it.
- Never submit patches that break existing tests(make test should take care of
downloading dependencies and running the tests)

Before starting to develop, enter 'make deps' to download all dependencies
needed for developing/testing. 'make test' will run all tests.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ deps:
git submodule update
npm install -d

build: deps
build:
mkdir -p build/js
mkdir -p build/css
@./node_modules/.bin/uglifyjs --comments \
Expand All @@ -13,7 +13,7 @@ build: deps
src/less/bootstrap-datetimepicker.less \
build/css/bootstrap-datetimepicker.min.css

test: build deps
test: build
@./test/run.sh

clean:
Expand Down
1 change: 1 addition & 0 deletions src/js/bootstrap-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@
click: function(e) {
e.stopPropagation();
e.preventDefault();
this._unset = false;
var target = $(e.target).closest('span, td, th');
if (target.length === 1) {
if (! target.is('.disabled')) {
Expand Down
11 changes: 10 additions & 1 deletion test/issues.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ suite 'issue', ->
# format: 'MM/dd/yyyy HH:mm:ss PP'
# value: '05/01/1905 09:52:00 PM'
# pick12HourFormat: true
# pickSeconds: false
# })

test "4 - TypeError: Cannot call method 'data' of undefined", ->
Expand Down Expand Up @@ -68,4 +67,14 @@ suite 'issue', ->
@dateWidget.find('.datepicker-days .day.new:contains(2)').click()
@dateShouldEqual(2013, 0, 2, 1, 1, 1)

test '61 - Delete date string and then select date by click the icon does not work', ->
# https://github.com/tarruda/bootstrap-datetimepicker/issues/61
# erase input box
@input.val('')
@input.change()
# open datetimepicker
@addon.click()
# select a date
@widget.find('.datepicker .day:contains(25)').click()
expect(@input.val()).to.equal('05/25/1905 21:52:14 0')

0 comments on commit 8e29132

Please sign in to comment.