aitomic-m-form-date
v2.0.0
Published
Default style of date field to simple and easy customization using global SASS mixin @input from package aitomic-base and javascript plugin [PickMeUp](https://github.com/nazar-pc/PickMeUp). Installation of dependencies is fully automatic.
Downloads
49
Readme
Default style of date field to simple and easy customization using global SASS mixin @input from package aitomic-base and javascript plugin PickMeUp. Installation of dependencies is fully automatic.
This package also contains our style (aitomic-theme) ready to use.
If you need submit field with different date format add to preview field a data atribute data-alt
and as value set a name of name
attribute of real field (notice that the preview field doesn't have a name
attribute):
<input type="text" class="m-datepicker__input a-form-input jq_datepicker" data-alt="start[max]">
<input type="hidden" name="start[max]" id="...">
In Optionally set translation to javascript variable 'pickMeUp_i18n' in @layout.latte. Append to macro {block translates}:
{block translates}
...
{if $lang->abbr == 'cz'}
var pickMeUp_i18n = {
days: ['Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'],
daysShort: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
daysMin: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
months: ['Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'],
monthsShort: ['Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čer', 'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro']
};
{/if}
{/block}