Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated Date Form Input to support nova-v3 format picker #213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prima-ca
Copy link

@prima-ca prima-ca commented Nov 1, 2021

This brings the Date form-field components up to the current Nova v3.29 capabilities, most importantly allowing the specification of alternate date formats, as described in https://nova.laravel.com/docs/3.0/resources/fields.html#date-formats

e.g.

Date::make( 'When', 'when_column') ->default(now())
                    ->labelClasses('w-full pt-4')
                    ->wrapperClasses('flex flex-col w-1/3 flex-1 px-4 pr-8')
                    ->fieldClasses('w-full py-4')
                    ->pickerDisplayFormat('d/m/Y')
                    ->format('DD/MM/YYYY');

The same could/should be done for DateTime, but as I haven't personally needed it... shrug

The package.json and yarn.lock file are also slightly modified to allow usage of node-sass@^6.0.1 as the old node-sass just doesn't compile.

@dvigueras
Copy link
Contributor

Hi @prima-ca thanks for your contribution.

Our team has been reviewing you PR and a little detail has caught our attention. What's the benefit of adding the new class to the $wrapperClasses attribute in src/Configurable.php ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants