nhn / toast-ui.react-calendar

TOAST UI Calendar wrapper for React.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getDate is not defined

idomiralin opened this issue · comments

Version

1.0.5

Test Environment

Chrome

Current Behavior

I have added your example but I receive getDate is not defined.

Expected Behavior


const getDate = (type, start, value, operator) => {
  start = new Date(start);
  type = type.charAt(0).toUpperCase() + type.slice(1);

  if (operator === '+') {
    start[`set${type}`](start[`get${type}`]() + value);
  } else {
    start[`set${type}`](start[`get${type}`]() - value);
  }

  return start;
};

They have something like this in the repo