Skip to content

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