Skip to content

Commit

Permalink
Create showPicker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxodin committed May 5, 2022
1 parent 750ea90 commit 865acc4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions polyfills/HTMLInputElement/prototype/showPicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

if (!HTMLInputElement.prototype.showPicker) {
let types = {'date':1, 'month':1, 'week':1, 'time':1, 'datetime-local':1, 'color':1, 'file':1};
HTMLInputElement.prototype.showPicker = function() {
if (this.type in types) {
this.click();
}
};
}

0 comments on commit 865acc4

Please sign in to comment.