title: get Asp calender selected Date into JQuery function
body: <p>I have Asp.net Calendar . I want to Get Selected Date from Date Cell and Save it in DB with some Text .. For Text I Used Prompt Dialog..</p>
  
  <p><a href="https://i.stack.imgur.com/nEx1g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nEx1g.png" alt="enter image description here"></a></p>
  
  <p>Calendar1_SelectionChanged event is not firing  . So I cannot get selected Date ..</p>
  
  <p>this is My prompt Function</p>
  
  <pre><code>function openPrompt() {
      var nName = prompt("Enter Title");
  
      $.ajax({
          type: "POST",
          url: "Events.aspx/SaveUser",
          data: '{user: ' + JSON.stringify(nName) + '}',
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (response) {
              alert("User has been added successfully.");
              window.location.reload();
          }
      });
  
  }
  </code></pre>
  
  <p>and web method ..</p>
  
  <pre><code>  public static void SaveUser(object user)
      {
          Events e = new Events();
  
          e._Event= user.ToString();
      }
  </code></pre>
  
  <p>Can I get Selected Cell Date in JQuery ?Or By Any other method ??</p>
  
  <p>Edit : I also Tried this :</p>
  
  <pre><code>var calendarDate = '&lt;%= Calendar1.SelectedDate %&gt;';
  
              var x = document.getElementById('&lt;%= Calendar1.ClientID%&gt;').value;
  </code></pre>
  
  <p>Not working ..</p>