1
I have several calendars registered in my database, each calendar has its particularity.
I have a screen that makes the inclusion of a file and through a dropdown
I choose the calendar that the periodicity of this file will respect.
Ex.: Daily, Weekly, Monthly and etc..
The idea is when the user clicks on a textbox
specific balloon appears warning the next available date for the file.
Ex. Today is the 28th.
Balloon: "The next date is day 29/04/2015" if the periodicity is daily.
Can help me build this function with Javascript?
I tried using the code below, but my main question is how it returns the next calendar date in the function
function ExibeDica(obj, msg, useBottom, maxWidth){
try
{
window.status = msg;
var msgDica = document.getElementById('msgDica');
if(msgDica)
{
msgDicaTexto.innerHTML = msg;
msgDica.style.zIndex = 9999;
msgDica.style.left = obj.getClientRects()[0].left + document.body.scrollLeft - 2;
msgDica.style.display = 'block';
if (maxWidth != null)
if (msgDica.offsetWidth > maxWidth) msgDica.style.width = maxWidth;
if (useBottom)
msgDica.style.top = obj.getClientRects()[0].bottom + document.body.scrollTop;
else
msgDica.style.top = obj.getClientRects()[0].top + document.body.scrollTop - msgDica.offsetHeight - 4;
}
}
catch(e) {}
}
function OcultaDica(){
try
{
window.status = '';
var msgDica = document.getElementById('msgDica');
if(msgDica)
{
msgDica.style.display = 'none';
msgDica.style.width = null;
}
}
catch(e) {}
}
What you’ve already done?
– Felipe Avelar
I tried to use a code from a tip I already had on the project.. my doubt is really how to bring this date to function, I will put the code I tried to use above
– chewie
Do you already have any code done (any attempt) regarding the problem (calculating the date)? The code placed in the question does not affect anything in the solution of the problem.
– Oeslei