question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'string' is not assignable to type 'Duration'

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Dekminozcommented, May 16, 2018

you’re welcome !

2reactions
Dekminozcommented, May 10, 2018

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 !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found