Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about the demo and working #83

Open
ArnoMandersTfe opened this issue Apr 7, 2023 · 4 comments
Open

Some questions about the demo and working #83

ArnoMandersTfe opened this issue Apr 7, 2023 · 4 comments

Comments

@ArnoMandersTfe
Copy link

First of all I looked at a lot of datepickers and I really like this one but the documentation is a little bit unclear for me (maybe skill issue)

https://fymmot.github.io/inclusive-dates/#demo

if deselect show-clear-button this works in the demo above. If I deselect show-today-button this is not visible (or invisible) in the demo above.

show-keyboard-hint changes the wrong setting (formatting)

is there a way to disable the quickButtons (today, yesterday, 10 days)? For example show-quick-buttons

I have difficulty to set the labels. Is it possible to set this inline (not in js/ts). Something like this isn't working

<inclusive-dates
   		first-day-of-week="1"
   		id="datepicker"
   		class="datepicker"
   		min-date="2023-01-01"
   		max-date="2023-04-20"
   		locale="nl-NL"
   		show-today-button="false"
   		input-should-format="false"
   		label="Kies een datum"
   		labels="{
 clearButton: 'Clear value!!!',
 monthSelect: 'Select month!!!',
 nextMonthButton: 'Next month!!!',
 nextYearButton: 'Next year!!',
 picker: 'Choose date!!!',
 previousMonthButton: 'Previous month!!!',
 previousYearButton: 'Previous year!!!',
 todayButton: 'Show today !!!',
 yearSelect: 'Select year!!!'
}"
   	></inclusive-dates>

And i also miss the Keyboard commands and Open calendar. The last one I see in defaultLabels but I have no idea how to set this because it's a constant

@syradar
Copy link

syradar commented Jan 8, 2024

@fymmot I'm also having troubles with the labels. And idea what changed in your fork because they work with wc?

@beakid
Copy link

beakid commented Jan 31, 2024

Having the same issue. Ping @fymmot

@beakid
Copy link

beakid commented Apr 2, 2024

Any chance anyone can have a look at this? @fymmot

@beakid
Copy link

beakid commented Apr 15, 2024

FYI @syradar and @ArnoMandersTfe : I managed to solve this in my Vue app by setting the labels prop manually like this:

Template:
<inclusive-dates ref="component" ...

Methods:

    get labels() {
        return {
            selected: 'vald',
            openCalendar: 'Öppna datumväljare',
            calendar: 'Kalender',
            invalidDateError: 'Datumet är felaktigt',
            minDateError: `Välj ett datum efter `,
            maxDateError: `Välj ett datum innan `,
            rangeOutOfBoundsError: `Datumen är inte giltiga`,
            disabledDateError: `Datumet går inte att välja`,
            to: 'till',
            startDate: 'Startdatum',
            clearButton: 'Rensa datum',
            monthSelect: 'Välj månad',
            nextMonthButton: 'Nästkommande månad',
            nextYearButton: 'Nästkommande år',
            picker: 'Välj datum',
            previousMonthButton: 'Föregående månad',
            previousYearButton: 'Föregående år',
            todayButton: 'Visa idag',
            yearSelect: 'Välj år',
            keyboardHint: 'Tangentbordskommandon',
            chooseAsStartDate: 'välj ett startdatum',
            chooseAsEndDate: 'välj ett slutdatum'
        };
    }

mounted() {
        this.$refs.component.inclusiveDatesLabels = this.labels;
        this.$refs.component.inclusiveDatesCalendarLabels = this.labels;
}

Not pretty, but gets the job done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants