amsul / amsul/pickadate.js

Add support for changing settings

Aperta
#763 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
7.6k
Fork
981
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I added this to the set method in the loop in order to change settings like format and labels. As "clear" is also defined you have to add "settings." to the item, so set('settings.format','yyyy/mm/dd') for example:

if (thingItem.indexOf ('settings.') != -1)
SETTINGS[thingItem.substring ('settings.'.length)] = thingValue;

Adding this at the end of the get method enables you to read settings to (like get('format')):

return SETTINGS[thing];

That's quick and dirty so please do your own implementation.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.