Skip to content

PeriodTypeSelector, how to change value programmatically #4355

Answered by stsrki
PavloParafiloCricut asked this question in Q&A
Discussion options

You must be logged in to vote

You're not supposed to change parameters directly. That warning comes from Blazor and warns you not to do it. Remember, Blazor, like most other SPA frameworks, prefer a declarative approach. That means you need to set parameters through the razor syntax.

Pseudo sample code:

<DatePicker Dates="@someDates" ... />

Task OnSomeAction()
{
  someDates = newDates;

  return Task.CompletedTask;
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@PavloParafiloCricut
Comment options

@PavloParafiloCricut
Comment options

Answer selected by PavloParafiloCricut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants