Giter VIP home page Giter VIP logo

Comments (8)

PH7-Jack avatar PH7-Jack commented on May 17, 2024

Can check it again?
What's your alpine version?

from wireui.

trippo avatar trippo commented on May 17, 2024

Alpine: 3.2.1
I think because the field is cast to a Carbon
I think when you implement carbon type this issue will be resolve

from wireui.

diazsasak avatar diazsasak commented on May 17, 2024

@trippo i got the same bug. how you resolve the issue?

from wireui.

visoftdev avatar visoftdev commented on May 17, 2024

@trippo i got the same bug. how you resolve the issue?

use timezone="UTC" in datetime picker and Carbon::parse($value)->timezone(Config::get('app.timezone'));

from wireui.

PH7-Jack avatar PH7-Jack commented on May 17, 2024

@diazsasak @visoftdev pass the user-timezone and the system timezone
<x-datetime-picker :timezone="$timezone" :user-timezone="$userTimezone" ... />

The user timezone is the navigator timezone by default
The System Timezone is UTC by default

from wireui.

visoftdev avatar visoftdev commented on May 17, 2024

I use in blade:

<x-datetime-picker label="Thời gian" timezone="UTC" time-format=24 interval=30 class="my-2" placeholder="Chọn thời gian" wire:model="datetime" />

in component:

$date = Carbon::parse($this->datetime)->timezone(Config::get('app.timezone'));

It worked!

Thanks

from wireui.

trippo avatar trippo commented on May 17, 2024

I used timezone="UTC" user-timezone="UTC" and carbon with default config ('Europe/Rome')

from wireui.

baoanhng avatar baoanhng commented on May 17, 2024

Why close, this hasn't been resolved. The problem is we have to manually adjust the timezone instead of using what Carbon has already provided.

from wireui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.