asp work schedule and javascript calendar

i have a javascript calendar when i click the button
the calendar pops up and when i select the date, it will insert into
textbox.

i also have one textbox for the TIME , and this is my question:

when i click the calendar ,the date will insert into textbox,
also the TIME will automatically display to textbox and this TIME is
taken from DB, it's an asp script that will retrieve the work
schedule of the user.


in other words:

if the user chooses,
 ex. nov.8, 2004, this is monday, asp script will call the work schedule of the user. if the work schedule of the user for monday is 5:48PM, the time 5:48PM will display into textbox..


is this possible?


thanks in advance...
waweeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nurbekCommented:
try

<%
DBTime= Now() 'get the time from database

%>
<script>
   var LocalTime = new Date();
     
   LocalTime = TimeSetting(LocalTime ,<%=Day(DBTime)%>,<%=Month(DBTime)%>,<%=Year(DBTime)%>,<%=Hour(DBTime)%>,<%=Minute(DBTime)%>,<%=Second(DBTime)%>);

function TimeSetting(myDate,mDay,mMonth,mYear,mHour,mMinute,mSecond) {  
   myDate.setDate(mDay);
   myDate.setMonth(mMonth);
   myDate.setYear(mYear);
   myDate.setHours(mHour);
   myDate.setMinutes(mMinute);
   myDate.setSeconds(mSecond);
   return myDate;
}

document.all.myField.value = LocalTime;
</script>

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
waweeAuthor Commented:
how can i test this?
0
nurbekCommented:
change the server time

<%
DBTime= DateAdd("n",-60,Now()) ' exctract 60 minutes
'DBTime= DateAdd("n",60,Now()) ' add 60 minutes

%>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.