Skip to content

altTimeFormat doesn't allow an empty value #706

@sporifolous

Description

@sporifolous

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions