File tree Expand file tree Collapse file tree
packages/devextreme/js/__internal/scheduler/workspaces Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1856,13 +1856,10 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
18561856
18571857 _isValidScrollDate ( date , throwWarning = true ) {
18581858 const viewOffset = this . option ( 'viewOffset' ) as number ;
1859- const min = this . getStartViewDate ( ) ;
1860- const max = this . getEndViewDate ( ) ;
1859+ const min = new Date ( this . getStartViewDate ( ) . getTime ( ) + viewOffset ) ;
1860+ const max = new Date ( this . getEndViewDate ( ) . getTime ( ) + viewOffset ) ;
18611861
1862- const extendedMin = new Date ( min . getTime ( ) + viewOffset ) ;
1863- const extendedMax = new Date ( max . getTime ( ) + viewOffset ) ;
1864-
1865- if ( date < extendedMin || date > extendedMax ) {
1862+ if ( date < min || date > max ) {
18661863 throwWarning && errors . log ( 'W1008' , date ) ;
18671864 return false ;
18681865 }
Original file line number Diff line number Diff line change @@ -322,14 +322,11 @@ export default class ViewDataProvider {
322322 if ( isDateInCell ) {
323323 return {
324324 position : getCellPosition ( columnIndex , rowIndex ) ,
325- cellData
325+ cellData,
326326 } ;
327327 }
328328
329- const diff = Math . min (
330- Math . abs ( date . getTime ( ) - cellStartDate . getTime ( ) ) ,
331- Math . abs ( date . getTime ( ) - cellEndDate . getTime ( ) ) ,
332- ) ;
329+ const diff = Math . abs ( date . getTime ( ) - cellStartDate . getTime ( ) ) ;
333330
334331 if ( findClosest && diff < resultDiff ) {
335332 resultDiff = diff ;
You can’t perform that action at this time.
0 commit comments