Our pure JavaScript Scheduler component


Post by vishnukumar »

the date range for bryntum scheduler is always remains 30 days (1 month).
If I make the date difference between the start date and end date of the scheduler as 3 months,
the range has been set one for one month from start date.
view preset is dayandweek
Is this the functionality of bryntum scheduler?
or else i have to change anything?

Post by mats »

Please show the code you use, and a screenshot showing what you expect should happen.

Post by vishnukumar »

Start date and end date of the bryntum scheduler has set dynamically in app.js file.
the code will be,
 setRVWData:function(response)
 {
  var me = this;
          me.resources = response.resources;
         me.events = response.events;
	me.startDate   =  new Date(response.startDate);
	me.endDate     =  new Date(response.endDate);
   }
where, me is the object of vue.
the date difference between the start date and end date is 90 days.
But the date range is set only for 30 days in bryntum scheduler
BryntumRange.PNG
BryntumRange.PNG (111 KiB) Viewed 2148 times

Post by mats »

Please use CODE tags when posting code. You should set these properties on the Scheduler instance.

Post by vishnukumar »

The values has been set for scheduler instance.
But the date range is always 30 days from the start date.
setRVWData:function(response)
 {
         this.$refs.scheduler.resources   = response.resources;
	 this.$refs.scheduler.events      = response.events;
	 this.$refs.scheduler.startDate   =  new Date(response.startDate);
	 this.$refs.scheduler.endDate     =  new Date(response.endDate);
 }

Post by vishnukumar »

Defaultspan can be set dynamically or it is a static one

Post by pmiklashevich »

Basically setting start and end dates as you did in you code snippet should work as well. Please go to our Basic demo and run in console:
scheduler.viewPreset = 'monthAndYear'
// you see one month
scheduler.startDate = new Date(2019, 0, 1)
scheduler.endDate = new Date(2019, 5, 1)
// you see 5 months
Please make sure your dates are correct.

If you need further assistance with this issue, please provide a runnable testcase that we can check.

Cheers,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by vishnukumar »

I did same like this.
But the preset is weekAndDay
but can't get the full date range.

Post by pmiklashevich »

I tried with 'weekAndDay' against Basic demo:
scheduler.viewPreset = 'weekAndDay'
scheduler.startDate = new Date(2019, 0, 1)
scheduler.endDate = new Date(2019, 5, 1)
Works fine for me.

How can we reproduce your issue? Could you please zip up your app and send it to us?

Pavlo Miklashevych
Sr. Frontend Developer


Post by vishnukumar »

when i give like this
this.$refs.scheduler.viewPreset = 'weekAndDay'
this.$refs.scheduler.resources   = response.resources;
this.$refs.scheduler.events      = response.events;
this.$refs.scheduler.startDate   = new Date(2019, 5, 1);
this.$refs.scheduler.endDate     =new Date(2019, 10, 1);
i got only 2 month of date range
date range in scheduler will be Jun 1 to Aug 12

Post Reply