<commit_before><template>
    <input type="date" 
           class="datepicker"
    >
</template>

<script type="text/babel">
    import IsLoadable from '../mixins/is-loadable'

    export default {
        mixins: [
            IsLoadable
        ],

        props: {
            value: {
                type: String
            }
        },

        methods: {
            init () {
                $(this.$el).pickadate()

                const picker = $(this.$el).pickadate('picker')
                picker.set('select', this.value)

                const vm = this
                this.$el.onchange = function () {
                    vm.$emit('input', picker.get('select', 'd mmmm, yyyy'))
                }
            }<commit_msg>Add date formating prop<commit_after><template>
    <input type="date" 
           class="datepicker"
    >
</template>

<script type="text/babel">
    import IsLoadable from '../mixins/is-loadable'

    export default {
        mixins: [
            IsLoadable
        ],

        props: {
            value: {
                type: String
            },
            format: {
                type: String
            }
        },

        methods: {
            init () {
                if (this.format) $(this.$el).pickadate({format: this.format})
                else $(this.$el).pickadate()

                const picker = $(this.$el).pickadate('picker')
                picker.set('select', this.value)

                const vm = this
                this.$el.onchange = function () {
                    if (this.format)
                        vm.$emit('input', picker.get('select', this.format))
                    else
                        vm.$emit('input', picker.get('select', 'd mmmm, yyyy'))
                }
            }
{'fraction_non_alphanumeric': 0.13172645739910313, 'fraction_numerical': 0.0, 'mean_word_length': 1.1610169491525424, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4414419', 'n_tokens_mistral': 503, 'n_tokens_neox': 462, 'n_words': 91}