Posts

Showing posts from January, 2021

ionic scroll y-axis

 .data{     width: 100%;     height: 100%;      overflow-y: auto;      touch-action: pan-y !important;  }  ion-content{        --overflow:scroll;   }

how to split array as per fixed length, and ionic two dates differences in min,seconds,hours

this . forsasi -->array var perChunk = 5 // items per chunk var inputArray = this . forsasi ; this . result = inputArray . reduce (( resultArray , item , index ) => { const chunkIndex = Math . floor ( index / perChunk ); if (! resultArray [ chunkIndex ]) { resultArray [ chunkIndex ] = [] // start a new chunk } resultArray [ chunkIndex ]. push ( item ); return resultArray }, []) console . log ( this . result ); this . d1 = JSON . parse ( localStorage . getItem ( "starttime" )); var d2 = new Date ( this . d1 ); console . log ( d2 ) var date1 = new Date (); var Str1 = ( "00" + ( date1 . getMonth () + 1 )). slice (- 2 ) + "/" + ( "00" + date1 . getDate ()). slice (- 2 ) + "/" + date1 . getFullYear () + " " + ( "00" + date1 . getHours ()). slice (- 2 ) + ":" + ( "00" + date1 . getMinutes ()). slice (- 2 ) + "...