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

Question about date module #2867

Closed
1Cedric1 opened this issue Jun 11, 2022 · 2 comments
Closed

Question about date module #2867

1Cedric1 opened this issue Jun 11, 2022 · 2 comments

Comments

@1Cedric1
Copy link

Hello and thank you for your job and the possibility to use the MagicMirror!

I have a question regarding the "date" module.

IMG_20220609_173031

I would like to have the "day" above the "date", on two lines, instead of one.

Example:

Monday
4th June 2022

instead of

Monday, 4th June 2022.

Could you explain me how to do that?

Thank you in advance and have a great week-end.

Kind regards,

Cédric

@sdetweil
Copy link
Collaborator

this is really a forum usage question, not a software issue , see https://forum.magicmirror.builders/

this can be done with a little formatting change and some css..

this is about the css to do the line split
https://stackoverflow.com/questions/51216748/react-momentjs-date-formatting-with-line-break

and u can specify the dateFormat as one of the clock module config options
(see the format in the stack overflow topic above, second reply.)
see https://docs.magicmirror.builders/modules/clock.html#configuration-options

but the little 'trick' is the css (using the white-space: pre;)

so, in ~/MagicMirror/css/custom.css
you would add

.clock .date {
white-space: pre;
}

@1Cedric1
Copy link
Author

Dear Sam, thank you very much!

best regards

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

2 participants