techouse / intl-date-time

International DateTime for Laravel Nova
MIT License
57 stars 21 forks source link

Feature request: programmatically set the field #46

Closed GautierDele closed 3 years ago

GautierDele commented 3 years ago

Hello there,

It could be a great feature to add the programmatic setting. In laravel nova when you emit this event: Nova.$emit('my-field-value', '20-06-1998') The field is automatically being set. Would it be possible to implement such a feature ?

Thanks, Gautier

GautierDele commented 3 years ago

This should be as simple as adding this to the form field:

        mounted() {
          Nova.$on(this.field.attribute + '-value', value => {
            this.value = value
          })
        },

Couldn't install the project because of some missing package, might be easier on your side