Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev jquery #48

Merged
merged 2 commits into from
Apr 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dist/datetime.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ angular.module("datetime").directive("datetime", ["datetime", "$log", "$document
select.select();
};

Element.prototype.val = function val(value) {
return this.el.val(value);
Element.prototype.val = function val() {
var _el;

return (_el = this.el).val.apply(_el, arguments);
};

return Element;
Expand Down
4 changes: 2 additions & 2 deletions lib/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ angular.module("datetime").directive("datetime", function(datetime, $log, $docum
select.moveEnd("character", end - start);
select.select();
}
val(value) {
return this.el.val(value);
val(...args) {
return this.el.val(...args);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"test": "eslint **/*.js && mocha",
"build": "browserify index.js | n-pipe dist/datetime.js && node build-demo.js",
"watch": "n-run -w src/* \"npm run build\"",
"watch": "n-run -w lib/* \"npm run build\"",
"preversion": "npm test && npm run build",
"version": "git add .",
"postversion": "git push --follow-tags && npm publish"
Expand Down