Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-2011, 11:11 PM
Starter Member
 
Posts: 1
Default calendar problems

i create weekly calendar in asp classic,now i want any date enter in textfield that date shown bold in calendar my coding are following---

********* coding *********


<body>
<%
dim sDate, currWeekDay, offsetWeekDay, firstWeekDate, endWeekDate, row
sDate = request.Form("txtDate")
'Response.Write(sDate & "<BR>")
if len(sDate) = 0 then
sDate =date
end if
sDate = CDate(sDate)
%>
<form action="mainfull.asp" method="post" >
Date: <input type="text" name="txtDate" id="txtDate" value="<%=sDate%>" /> &nbsp;&nbsp;&nbsp;(date formate i.e. mm/dd/yyyy) <br />
<input type="submit" name="btnSubmit" id="btnSubmit" title="Click Here to enter any Day" value="Submit" />
</form>

<%
currWeekDay = weekday(sDate)
offsetWeekDay = 2 - currWeekDay
firstWeekDate = DateAdd("d", offsetWeekDay,sDate)
response.Write("<BR>" & "<b>" & weekday(sDate)& "</b>")
endWeekDate = DateAdd("d", 6,firstWeekDate) 'month(firstWeekDate) & "/" & (day(firstWeekDate) + 6) & "/" & year(firstWeekDate)
response.write "<br>"
'******************************** By Farhat *************************************
dim pk,firstday,lastday
pk = "11/10/2011"
week = (DatePart("ww",pk))

firstday = dateadd("d",(-datepart("w",date())),pk)
lastday = dateadd("d",(7-datepart("w",date())),pk)

'response.write week
'response.write "<br>"
'response.Write firstday
'response.write "<br>"
'response.Write lastday

'******************************** End *************************************
%>
<table border="1">
<%
for row=0 to 3
firstRowDate = DateAdd("d", row,firstWeekDate)
%>
<tr>
<% if row <> 3 then %>
<td><%=firstRowDate%></td><td><%=DateAdd("d", 4,firstRowDate)%></td>
<% else %>
<td><%=firstRowDate%></td><td><table><tr><td><%=MonthView_ColumnHead(firs tWeekDate, TRUE)%> </td><td><%=MonthView_ColumnHead(DateAdd("m", 1,firstWeekDate), TRUE)%></td></tr></table></td>
<% end if %>
</tr>
<%
next
%>
</table>
</body>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.