jQuery-Clock-Plugin
jQuery-Clock-Plugin copied to clipboard
Displaying time improperly in the date.
Even without using timeFormat, it is displaying the time alongside the date. I believe it should only display the date.
const dateOptions = {
"timestamp": currentTimestamp,
"dateFormat": {
"calendar": "gregory",
"weekday": "long",
"year": "numeric",
"month": "long",
"day": "numeric",
"timeZone": timeZoneName
},
"timeFormat": false,
"locale": "pt-BR",
"isDST": isDST
};
$("#jqDate").clock(dateOptions);
Thank you for taking interest @LeoPereiraVra . I had never contemplated a false value for timeFormat on a clock plugin in fact! I didn't see a use case for not showing time on a clock 😄
If you think this can be a useful feature, perhaps it could be considered. But it's easy enough to hide it via CSS, or just pass an empty string to the timeFormat parameter.
Thank you for taking interest @LeoPereiraVra . I had never contemplated a
falsevalue fortimeFormaton a clock plugin in fact! I didn't see a use case for not showing time on a clock 😄If you think this can be a useful feature, perhaps it could be considered. But it's easy enough to hide it via CSS, or just pass an empty string to the
timeFormatparameter.
Esse é um exemplo de como tentei fazer, acho que teria que usar o css mesmo, mas nas versões anteriores estava funcionando não exibindo o relógio
https://jsfiddle.net/2sbg46oa/
Here is your example with one CSS rule added: https://jsfiddle.net/wbo5gjq4/
The jQuery Clock plugin creates a <span> with class clockdate for the date, and clocktime for the time. So you can easily hide the time with a rule of display: none.
But if you're trying to use this plugin to show just a date and not time, I think it might be the wrong plugin to use. In fact, you don't need any plugin to show a date.
The whole reason for this plugin was to have a clock that shows time. It also supports showing the date along with the time. But showing only the date and not time is something you can just do, without any kind of plugin.
I'm using it for the date and time, but in separate locations, and when a new day arrives, the date should update automatically. I think I'll have to hide the time with CSS.