amsul / amsul/pickadate.js

Add support for changing settings

Aberta
#763 0 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
7.6k
Forks
981
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.