'string' is not assignable to type 'Duration'
See original GitHub issueI’m defining the calendar options as follows:
this.calendarOptions = {
editable: true,
eventLimit: false,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay,listMonth'
},
buttonText: {
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Lista'
},
aspectRatio: 2,
minTime: '08:00:00',
maxTime: '22:00:00',
slotDuration: '00:00:15',
slotLabelInterval: '00:01:00',
locale: 'es-CL',
events: this.eventos
};
However I keep getting this error although the calendar is rendering correctly. Any idea how to bypass this? The problem is with defining durations as a string I guess but it is supposed to be the correct format
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Typescript Type 'string' is not assignable to type - Stack Overflow
Yes, "Banana" is the type. It is extends String so it's assignable to String . Additionally, a type extends a Union Type when...
Read more >Type 'string' is not assignable to type in TypeScript | bobbyhadz
The "Type 'string' is not assignable to type" TypeScript error occurs when we try to assign a value of type string to something...
Read more >Type 'string' is not assignable to type 'string[]' : r/typescript
Hi - I'm trying to create a component where one of the properties of the component is an array of strings. I've set...
Read more >Type 'string' is not assignable to type 'Date'." #14371 - GitHub
I have a simple model which includes a createdAt DateTime @default(now()) column, generating a SQLite db. I'm using Remix.run to fetch some rows...
Read more >type 'string' is not assignable to type 'number'.ts
In this tutorial, we will see how to fix error type 'string' is not assignable to type 'number'.ts and also how to fix...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you’re welcome !
Hi,
I have bypass the problem , by passing all duration like minTIme,maxTime etc with moment.duration like this : moment.duration(‘08:00:00’) .
If you need help with parameters you can check, parameter type in index.d.ts . exemple for minTime you have “maxTime?: moment.Duration” .
Good luck !