I am having Datetime Error using Web Control(PopCalendar)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: I am having Datetime Error using Web Control(PopCalendar)

  1. #1
    Join Date
    Dec 2008
    Location
    *****, Nigeria
    Posts
    62

    I am having Datetime Error using Web Control(PopCalendar)

    Hi,

    I am a greenhorn when it comes to using Javascript technologies. I adopted two recently from different third parties. The issues with the first one is that
    :after placing the control(RJS PopCalendar) one the UI and accessing it in code behind using the code below:
    Code:
    obj.DateAdmitted = Datetime.Parse(this.txtAdmissionDate.Text);
    
    Or
    
    obj.DateAdmitted = Convert.ToDatetime(this.txtAdmissionDate.Text);
    I get this runtime error:

    "Date time overflow. Date time should be within ..../1999 and ...9999

    If I attempt the same with AjaxControlToolkit Calendar extender in the UI as follows:

    Code:
    <AjaxToolkit:CalendarExtender ID="txtAdmissionDate_CalendarExtender" runat="server" Enabled="True"
                            TargetControlID="txtAdmissionDate">
                        </AjaxToolkit:CalendarExtender>
    I get another error: String not recognized as valid DAtetime object

    Please how do I get around this issues. thank You.
    Mobile: +234 706 042 6036
    Email: charles@hedonmark.com
    Website: www.hedonmark.com

    “To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.”
    —Ralph Waldo Emerson

  2. #2
    Join Date
    Dec 2008
    Location
    *****, Nigeria
    Posts
    62
    Hi guys,
    I rsolved the error finally. I just made the Datetime field of my entity i.e DateAdmitted to be nullable. So it can accept nulls. Do'nt know the details but it works .That's what's important. Have a great week guys. Let's hope this week is error-free. Of course I mean errors that won't pursue me to the forum to share them.LOL

    Charles
    Mobile: +234 706 042 6036
    Email: charles@hedonmark.com
    Website: www.hedonmark.com

    “To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.”
    —Ralph Waldo Emerson

Similar Threads

  1. Replies: 0
    Last Post: 09-25-2008, 11:56 PM
  2. Replies: 0
    Last Post: 03-31-2007, 08:40 AM
  3. Using Java 6SE to query a web service
    By (MC3)RaVeN in forum Java
    Replies: 0
    Last Post: 03-02-2007, 09:30 AM
  4. Re: Why REST is a better way to do Web Services
    By Michael D. Kersey in forum .NET
    Replies: 2
    Last Post: 08-30-2002, 12:05 AM
  5. Free ASP.NET Web Matrix Design/Editor Tool Released
    By ASPSmith Training in forum dotnet.announcements
    Replies: 0
    Last Post: 06-18-2002, 03:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center