ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

Fixed compatibility issue with TypeScript 1.8 #56

Closed kat3su closed 7 years ago

kat3su commented 7 years ago

Get accessors only will create readonly annotation when compiled with typescript 2.0 and doesn't work well with typescript 1.8

So I added Set accessors as well to avoid the readonly tag.

You can possibly get rid of the get accessors all together as I coudln't see it being used anywhere. But instead, use function. Eg

public getCurrentYear() {}
public getCurrentMonth() {}
public getCurrentDay() {]
public today() {}
kat3su commented 7 years ago

Issue #24

allenhwkim commented 7 years ago

@Krisa could your review this?

allenhwkim commented 7 years ago

I think it's better to remove getter and setter by changing getters to a function instead.