PHPackages                             gustavowiller/intl-date-time - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. gustavowiller/intl-date-time

ActiveLibrary[Localization &amp; i18n](/categories/localization)

gustavowiller/intl-date-time
============================

International datepicker for Laravel Nova.

v1.0.8(7y ago)27MITVuePHP &gt;=7.1.0

Since Feb 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gustavowiller/intl-date-time)[ Packagist](https://packagist.org/packages/gustavowiller/intl-date-time)[ RSS](/packages/gustavowiller-intl-date-time/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (10)Used By (0)

International DateTime
======================

[](#international-datetime)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6d4e3c7f21a903c166070c1171e1ff967b75838ef24ed5d70bb2d2958d3fdd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746563686f7573652f696e746c2d646174652d74696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/techouse/intl-date-time)[![Total Downloads](https://camo.githubusercontent.com/c7abb0fbaf042fc6e30305eafa1e044442a9dfddef6ec48e4d26385fd2fd0265/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746563686f7573652f696e746c2d646174652d74696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/techouse/intl-date-time)

##### International datepicker for Laravel Nova

[](#international-datepicker-for-laravel-nova)

Apply localisation in **63** different locales to Laravel Nova's default `DateTime` field that currently doesn't support localisation out of the box.

[![International DateTime](./screenshot.png)](./screenshot.png)

Installation
------------

[](#installation)

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require techouse/intl-date-time
```

Usage
-----

[](#usage)

The API is adapted from [Nova's default `DateTime` Field](https://nova.laravel.com/docs/1.0/resources/fields.html#datetime-field).

The module itself offers 3 optional configurations:

- **locale** - *OPTIONAL* - With this you can define the module's locale. If you do not it will automatically use your app's `config('app.locale')`. If you manually define an unsupported locale it will throw an Exception!
- **dateFormat** - *OPTIONAL* - With this you can define a date format. If you do not provide it the module will automatically use the appropriate locale's date format. The format must be [MomentJS compatible](https://momentjs.com/docs/#/displaying/format/)!
- **timeFormat** - *OPTIONAL* - With this you can define a time format. If you do not provide it the module will automatically use `HH:mm:ss`. The format must be [MomentJS compatible](https://momentjs.com/docs/#/displaying/format/)! If you manually define an unsupported time format it will throw an Exception!

Simply use `IntlDateTime` class instead of `DateTime` directly or alias it like the example below so you won't have to refactor too much existing code.

```
