3 questions about calander

windows

Guest
1) how can i create a button so when i click on it a calander will open
2)how can i from the calamder in (1) when the user selectes a data ,the select value will be written into a text box
on the page
3)is there a calander in hebrew maybe?that show the hebrew date ?
thnaks in advance
pelegsince there hasn't a response yet, I'm gonna give a shot :)

1) make 2 panels: p1, and p2,
inside p1, there's a <asp:Button>, inside p2 there's <asp:Calendar>.
(I) when page load, p1.visible=true, p2.visible=false;
(II) when button clicked, p1.visible=false; p2.visible=true;

(syntax/method maybe wrong, but idea should be straight forward)
2) suppose p2 has a <asp:Calendar> and <asp:textBox>
when calendar being clicked, it should trigger the DayRender method, therefore:

(I) private void DayRender(Object source, DayRenderEventArgs e){
txtBox.Text = e.Day.toString();
}

3) sorry, can't help u here, you may wanna check out msdn.com's libraryWell try this:

<asp:button id="button1" text="ViewCal" onclick="ViewCal" runat="server" /><br>
<asp:panel id="panel1" visible="false" runtat="server">
<asp:calendar id="calendar1" onselectionchanged="ViewSelected" runat="server" /><br>
<asp:textbox id="textbox1" runat="server" />
</asp:panel>

-------------------------------------------------------------------------
void ViewCal(object sender, System.EventArgs e) {
panel1.Visible = true;
}

void calendar1_SelectionChanged(object sender, System.EventArgs e) {
textbox1.text = calendar1.SelectedDate.ToShortDateString();
}

you have alot of other options:
SelectedDate.ToLongDateString();
SelectedDate.ToLongDateString();
SelectedDate.ToLongTimeString();
SelectedDate.ToShortTimeString();
SelectedDate.Hour.ToString();
SelectedDate.Minute.ToString();

you can find out more....
 
Back
Top