fooloomanzoo / datetime-picker

A minimal picker for date and time for Polymer, that can use the native input
MIT License
78 stars 18 forks source link

Fix incorrect javascript in datetime-picker-mixin.html #34

Closed guirenard closed 6 years ago

guirenard commented 6 years ago

https://github.com/fooloomanzoo/datetime-picker/commit/ba01eeac7e50b6e32341a99e87caa52f8008c2ba#diff-883cda978cbcef86007470924dc1e37a is not valid javascript and does not pass lint check.

03:09:07      [exec] SyntaxError: ./bower_components/datetime-picker/datetime-picker-mixin.html_script_0.js: "prop" is read-only
03:09:07      [exec]   141 |               case 'year':
03:09:07      [exec]   142 |               case 'month':
03:09:07      [exec] > 143 |                 prop = 'year'; break;
03:09:07      [exec]       |                 ^
03:09:07      [exec]   144 |               case 'day':
03:09:07      [exec]   145 |                 prop = 'month'; break;
03:09:07      [exec]   146 |               case 'hours':

The prop constant should be turned into a variable.

fooloomanzoo commented 6 years ago

merged