Link to home
Start Free TrialLog in
Avatar of conrad2010
conrad2010

asked on

JQuery DatePicker in ASP.NET

I'm having a hard time making JQuery DatePicker work in asp.net. Can anyone tell me the trick?

See this post for more details and screencaps:

https://www.experts-exchange.com/questions/27188492/JQuery-function-call-what-is-the-correct-syntax.html
Avatar of leakim971
leakim971
Flag of Guadeloupe image

VS 2010 :


<%@ Page Title="Page d'accueil" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<link rel="stylesheet" href="http://eyecon.ro/datepicker/css/datepicker.css" type="text/css" /> 
<script type="text/javascript" src="http://eyecon.ro/datepicker/js/jquery.js"></script> 
<script type="text/javascript" src="http://eyecon.ro/datepicker/js/datepicker.js"></script> 
<script type="text/javascript">
    $(document).ready(function () {
        $("#startdate").DatePicker({
            flat: true,
            date: ['2008-07-28', '2008-07-31'],
            current: '2008-07-31',
            calendars: 1,
            mode: 'range',
            starts: 1
        });
    })
</script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<p id="startdate"></p>
</asp:Content>

Open in new window

Did you notice <p id="startdate"></p> ?
Avatar of conrad2010
conrad2010

ASKER

yes, I changed that to <input type="text" id="startdate" /> but the <p> tag worked fine on my local machine in a simple html file... it's only when I get it to Visual Studio I get problems...
dont change it to an input it will not work
I do need something like that with an input...
go to an other datepicker, why this one?

The most used : http://jqueryui.com/demos/datepicker/
Easy to use : http://www.ama3.com/anytime/
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! This is perfect...