jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Placeholder #26

Open antwaanh opened 10 years ago

antwaanh commented 10 years ago

It would be nice to have a third option for placeholder text.

Ex: new Formatter(birthDateInput, { 'pattern': '{{99/99/9999}}', 'persistent': true 'placeholder': 'MM/DD/YYYY' });

jaridmargolin commented 10 years ago

Curious on how you would would like to see this implemented. Would the functionality be different than the html placeholder attribute?

tjramage commented 10 years ago

Would love to see this functionality implemented! It should work just as the normal placeholder attribute does currently, i.e. as soon as user input is detected, the placeholder gets replaced with the pattern.

jaridmargolin commented 10 years ago

@tjramage I'm still not sure I understand... why not just use the html placeholder attribute?

AdamGerthel commented 10 years ago

Doesn't this plugin override the placeholder attribute when persistent is set to true?

iduuck commented 9 years ago

@AdamGerthel Not only on persistent: true. I cannot see a placeholder.