Skip to content

altTimeFormat doesn't allow an empty value #706

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

Closed
sporifolous opened this issue Mar 25, 2014 · 2 comments
Closed

altTimeFormat doesn't allow an empty value #706

sporifolous opened this issue Mar 25, 2014 · 2 comments

Comments

@sporifolous
Copy link

I think it would be advantageous to allow an empty string value for the 'altTimeFormat' option. This would allow putting just the date in the alt field and just the time in the regular field. Currently, if an empty string is passed for 'altTimeFormat', the time is still placed in the altField.

An easy fix: an else if on line 893:

else if (this._defaults.altTimeFormat !== ""){
    altFormattedDateTime += this.formattedTime + altTimeSuffix;
}

I hope this can be helpful.

@ScottDennison
Copy link

Note that the same problem applies to altSeparator and altTimeSuffix

@trentrichardson
Copy link
Owner

I updated the dev branch with a potential fix

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

3 participants