Skip to content

Handle timezone in Date fields (with time) #774

Description

@dvlpp

Allow a new setTimezone(string) method on SharpFormDateField

Handle the timezone in DateFormatter

Maybe provide a a way to globally configure ?

class SharpServiceProvider extends SharpAppServiceProvider
{
    protected function configureSharp(SharpConfigBuilder $config): void
    {
        $config
            ->configureDateFields(
                mondayFirstDayOfWeek: true,
                defaultTimezone: 'Europe/Paris',
            );
    }
}

Even allowing closure (might be tricky)?

config->configureDateFields(defaultTimezone: fn () => auth()->user()->timezone);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions