MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

Add ability to hide time in clock module

Open prapicault opened this issue 4 years ago • 8 comments

Hi, I would like for the clock module to have the ability to hide the time (so it only displays the date). I have already changed the code in my installation but it makes keeping up with master a bit annoying. Would you be interested in a contribution that would add a showTime configuration option to the default clock module? This option when set to false would not render the time at all.

prapicault avatar Feb 20 '21 22:02 prapicault

you could use css to hide the time by overriding the class set to display:none;

sdetweil avatar Feb 20 '21 23:02 sdetweil

I probably could (though tbh, it did not even occur to be me try) but it does not seem to be as discoverable as a configuration for other users.

prapicault avatar Feb 20 '21 23:02 prapicault

Feel free to send a PR. 👍🏻

MichMich avatar Feb 23 '21 13:02 MichMich

I looked into the clock module to see if hiding the time was possible. Yes it is, but the module is loaded with different options for all kind of things which made me think if it could be reworked a little. But then one or two options might change so I wanted forst to ask @MichMich what the official stance on removing / chaning options in the default module is?

rejas avatar Apr 18 '21 07:04 rejas

I don't think we should overbloat the clock module (I think it already is a bit). If someone really wants super specific features, it's better to opt for a third party module.

I'm not a big fan for removing options and essentially introducing breaking changes.

MichMich avatar Apr 18 '21 07:04 MichMich

Maybe introduced in some of the refactoring above, but since the last update my analogue clock's analogShowDate: 'false', property no longer works - the date is output alongside the analog clock face. I can set that to bottom or top and move it around, but 'false' no longer works to remove it.

Reading the documentation (https://docs.magicmirror.builders/modules/clock.html#configuration-options) suggests the analogShowDate is 'Obsolete, can be replaced with analogPlacement and showTime.' However, showTime or showDate when set to false still aren't hiding the date display alongside the analog clock.

This is the config that used to work fine for me:

{
  module: 'clock',
  position: 'middle_center',
  config: {
    displayType: 'analog',
    analogShowDate: 'false',
    analogFace: 'face-006',
    analogSize: '950px'
  }
},

I've hidden the unwanted date with CSS for now, but it seems some of these options are not working as they should ...

AndyHazz avatar Oct 25 '21 16:10 AndyHazz

analogShowDate: 'false'

means true

false and true should be without quotes

sdetweil avatar Oct 25 '21 16:10 sdetweil

ahh, that makes sense analogShowDate: false still doesn't hide the date as it used to, but showDate: false achieves the same effect

AndyHazz avatar Oct 25 '21 18:10 AndyHazz

@prapicault @AndyHazz can this issue be closed since your problems should be fixed in the last year ;-) ? if yes @MichMich can do it

rejas avatar Oct 03 '22 18:10 rejas

Fine by me, I've had no issues since switching to use showDate: false

AndyHazz avatar Oct 03 '22 18:10 AndyHazz