I have built a calendar application just with jQuery. The script file is on Github. The code works perfectly fine and I have tested it. Please feel free to clone and test it as well.I am uncertain on the logic that I have used for building this application.Basically, I have used a table and for storing the dates and I have appended dates w.r.t day (Mo, Tu ... Su).for(var rowNo=0; rowNo<dayRows-1;rowNo++){   $(.tableBody, config.container).append(<tr class='rowCell'><td class='Mo +  tank.weeks['Mo'].prop[rowNo] +'>+ tank.weeks['Mo'].date[rowNo] +</td><td class='Tu + tank.weeks['Tu'].prop[rowNo] +'>+ tank.weeks['Tu'].date[rowNo]+</td><td class='We + tank.weeks['We'].prop[rowNo] +'>+ tank.weeks['We'].date[rowNo] +</td><td class='Th + tank.weeks['Th'].prop[rowNo] +'>+ tank.weeks['Th'].date[rowNo]+</td><td class='Fr + tank.weeks['Fr'].prop[rowNo] +'>+ tank.weeks['Fr'].date[rowNo] +</td><td class='Sa + tank.weeks['Sa'].prop[rowNo] +'>+ tank.weeks['Sa'].date[rowNo]+</td><td class='Su + tank.weeks['Su'].prop[rowNo] +'>+ tank.weeks['Su'].date[rowNo] +</td></tr>);}The calendar should scroll to the present day and I am diving id for every cell and making the control to go there when the calendar is opened.var currentDate = new Date();var idInfo = currentDate.toDateString().split( );var scrollingTo = idInfo[2]+idInfo[1]+idInfo[3];/*Scrolling to the Present/selected date*/        var flag=true;        $(.+config.inputBoxName)        .focusin(function(){            $(.container, config.container).show();            $(.bodyContainer, config.container).show();            if(flag){             $(.+config.inputBoxName).val(curDate +-+ config.monthNumber[config.monthName[currentDate.getMonth()].slice(0,3)] +-+ currentDate.getFullYear());            $(.bodyContainer, config.container).scrollTop($('.'+scrollingTo, config.container).offset().top - ((bodyHeight-80)+(config.numOfDiabledRows)*40));             flag = false;            } else {                $(.bodyContainer, config.container).scrollTop($('.'+scrollingTo)/*.position().top +(config.numOfDiabledRows)*40*/);            }           });Is this the proper approach? If not, what would be more appropriate or correct way this application could be built?
Calendar application with shaky Logic
javascript;jquery;datetime