Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (value) {
- let splitTime = value.split(':')
- date = new Date()
- // If ...splitTime (spread operator) is used in below, compiler throws exeption - "Expected 1 or 4 arguments but got 0 or more" (I consider it as TS bug)
- date.setHours(splitTime[0], splitTime[1], splitTime[2]);
- // now I can use date string in my plugin
- }
Add Comment
Please, Sign In to add comment