Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the space between date and time for Calendar events #225

Open
danielstreif opened this issue Dec 18, 2019 · 0 comments
Open

Increase the space between date and time for Calendar events #225

danielstreif opened this issue Dec 18, 2019 · 0 comments

Comments

@danielstreif
Copy link
Collaborator

danielstreif commented Dec 18, 2019

@jarjan @pheeria I didn't find a way to insert visible spaces between date and time yet. The whole thing is in one string which is created in facebook.js. However, multiple spaces will not be shown in a browser. Using CSS seems to be the best solution but I'm not exactly sure how to implement it. Here a related question and here our code:

const stringifyEventDate = eventDate => {
  let result = "";
  const start = moment.parseZone(eventDate.start_time);
  const end = moment.parseZone(eventDate.end_time);

  if (start.isSame(end, "day")) {
    result = `${start.format("DD.MM.YYYY")} ${start.format(
      "HH:mm"
    )} - ${end.format("HH:mm")}`;
  } else {
    result = `${start.format("DD.MM.YYYY")} ${start.format(
      "HH:mm"
    )} - ${end.format("DD.MM.YYYY")} ${end.format("HH:mm")}`;
  }
  return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant