asp.net calendar enhancement

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: asp.net calendar enhancement

    I was hoping that the available web control calendar
    would be the same except have the month and year as drop
    down boxes so that the user can see the calendar and jump
    to the date they are looking for at the same time.

    I hope this makes more sense.

    Marlene
    >-----Original Message-----
    >It depends on what kind of interface you want for
    navigating the dates. Do
    >you want users to be able to type in a date
    like '6/26/3002' and it would
    >jump to that date? If so, that is possible. Or did you
    have some other
    >specific UI in mind?
    >
    >-Trevor
    >
    >
    >"Marlene" <mkhalil@oise.utoronto.ca> wrote in message
    >news:0bb801c33b2a$63a99830$a601280a@phx.gbl...
    >> Hello,
    >>
    >> I'm using the VB.net calendar for my aspx page and I
    was
    >> wondering if it is possible to enhance it so that the
    >> user can directly select which month and which year
    they
    >> would like to go to rather than only being able to go
    the
    >> next or previous months. If it is, how do I do this?
    >>
    >> Thanks,
    >> Marlene
    >
    >
    >.
    >
    Marlene Guest

  2. Similar Questions and Discussions

    1. Laptop viewing enhancement with sdk possible
      I am new to the acrobat sdk, but one thing that always bugged me about reading a pdf book on a laptop was "getting rid" of the non-essential text...
    2. 2006 calendar needed for photo calendar
      I want to start work on a 2006 calendar featuring my own photographs. In Photoshop there used to be a calendar-creating feature that worked well,...
    3. FOLLOW-UP: [Idea for PHP Enhancement: register_globals_manual]
      On 10/06/2003 11:50 AM CST, the OP, 127.0.0.1, wrote: Justin Koivisto wrote: Just wanted to follow-up on this one. Did this actually satisfy...
    4. Idea for PHP Enhancement: register_globals_manual
      With all the problems with having register_globals = on, I propose the following idea: We define register_globals_manual = on as a new...
    5. Image enhancement
      The guys that do the PS'ing for police departments are very good at what they do and have software add-ons. You can play with the Unsharpen Mask, but...
  3. #2

    Default Re: asp.net calendar enhancement

    Not sure how you intend to get input from the user but here's a sample
    that allows selection from a listbox.

    Drop the following code and codebehind into an ASPX page named
    CustCal.
    Set the Default namespace of the project to CSWeb.
    Give it a try, nothing that this sample only does future navigation

    (Is the CN tower in the clouds today?)

    - Fred

    **************ASPX code**********************
    <%@ Page Language="vb" AutoEventWireup="false"
    Codebehind="CustCal.aspx.vb" Inherits="VBWeb.CustCal" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <title>Birthday Calendar</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema"
    content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:Calendar id="Calendar1" style="Z-INDEX: 103; LEFT: 27px;
    POSITION: absolute; TOP: 21px" runat="server" BackColor="#C0FFFF"
    BorderStyle="Solid" Height="276px" Width="328px" ShowGridLines="True">
    <DayStyle Font-Size="Smaller" Font-Names="Arial"></DayStyle>
    <DayHeaderStyle Font-Size="XX-Small" Font-Names="Arial"
    BackColor="#FFC0FF"></DayHeaderStyle>
    <TitleStyle Font-Names="Arial"
    BackColor="#C0C0FF"></TitleStyle>
    </asp:Calendar>
    <asp:ListBox id="lstMonth" style="Z-INDEX: 102; LEFT: 309px;
    POSITION: absolute; TOP: 27px" runat="server" Font-Names="Arial"
    Font-Size="XX-Small" Height="163px" Width="41px" Visible="False"
    AutoPostBack="True"></asp:ListBox>
    </form>
    </body>
    </HTML>

    ************** code behind **********************
    Public Class CustCal
    Inherits System.Web.UI.Page
    Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar
    Protected WithEvents lstMonth As System.Web.UI.WebControls.ListBox

    <System.Diagnostics.DebuggerStepThrough()> Private Sub
    InitializeComponent()
    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    InitializeComponent()
    End Sub

    Private Sub Calendar1_VisibleMonthChanged(ByVal sender As
    System.Object, ByVal e As
    System.Web.UI.WebControls.MonthChangedEventArgs) Handles
    Calendar1.VisibleMonthChanged
    'effectively cancel the navigation
    Calendar1.VisibleDate = e.PreviousDate
    'get a new month to display
    ShowMonthSelector(e.PreviousDate)
    End Sub

    Private Function ShowMonthSelector(ByVal dtCurrent As Date) As Date
    Dim i As Integer
    'display an ordered list starting with the next month
    lstMonth.Items.Clear()
    For i = 1 To 12
    lstMonth.Items.Add(Format(dtCurrent.AddMonths(i), "MMM"))
    Next
    lstMonth.Visible = True
    End Function

    Private Sub lstMonth_SelectedIndexChanged(ByVal sender As
    System.Object, ByVal e As System.EventArgs) Handles
    lstMonth.SelectedIndexChanged
    Dim iMonth As Integer
    Dim iYear As Integer
    'set the calendar to the selecteed month
    lstMonth.Visible = False
    iMonth = Calendar1.VisibleDate.Month + lstMonth.SelectedIndex + 1
    iYear = Calendar1.VisibleDate.Year
    If iMonth > 12 Then
    iYear += 1
    iMonth = iMonth Mod 12
    End If
    Calendar1.VisibleDate = New Date(iYear, iMonth, 1)
    End Sub
    End Class



    "Marlene" <mkhalil@oise.utoronto.ca> wrote in message news:<0bb801c33b2a$63a99830$a601280a@phx.gbl>...
    > Hello,
    >
    > I'm using the VB.net calendar for my aspx page and I was
    > wondering if it is possible to enhance it so that the
    > user can directly select which month and which year they
    > would like to go to rather than only being able to go the
    > next or previous months. If it is, how do I do this?
    >
    > Thanks,
    > Marlene
    Fred. Guest

  4. #3

    Default Re: asp.net calendar enhancement

    [url]http://cheapdevtools.com/product/product.asp?ProdID=246[/url]
    > "Marlene" <mkhalil@oise.utoronto.ca> wrote in message news:<0bb801c33b2a$63a99830$a601280a@phx.gbl>...
    > > Hello,
    > >
    > > I'm using the VB.net calendar for my aspx page and I was
    > > wondering if it is possible to enhance it so that the
    > > user can directly select which month and which year they
    > > would like to go to rather than only being able to go the
    > > next or previous months. If it is, how do I do this?
    > >
    > > Thanks,
    > > Marlene
    Cann Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139