Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104400
    Andrea Durando
    Participant

    Hi all,
    i have an issue about the getViewDate used in the changeDate event,
    I need to execute an ajax call when the view of the scheduler is changed (to make a search , to do that try to use the event changeDate.
    So i wrote t,
    with the following method:

     changeDate(_event: CustomEvent): void {
      const viewDates = this.scheduler.getViewDates();
      viewDates.then((value: Date[]) => {
            calltoserver(value)
       })
      
      }

    the getViewDates return not the new DateRange but the old one,
    so for now to fix it i need add a setTimout with 200ms of delay to give the trime to the page to update it,
    but that’s a empirical solution.
    Do you have any suggestion on how can I resolve this issue?

    Regards
    Andrea

    #104404
    ivanpeevski
    Participant

    Hi Andrea,

     

    Thanks for reporting that!

    Regarding your solution, the 200ms delay is needlessly big. You can also achieve the same effect with 0ms

     

    Best regards,
    Ivan Peevski

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.