javascript - Set date for C1WebDateEdit control on page load -


I have a webdeadit control. On page load I want to set that control date through javascript. I have tried the following, but it is not working,

  var userid = '& lt;% = session ("userid"). ToString% & gt; '; // 20-Dec-2013 var strdate = dtsheet.split ("-"); Var Sheetdate = New Date (Straddet [2] + "/" + Changemand (Straddet [1]) + "/" + Straddet [0]); // changeme 12dtpdidet.edetet (sheetdate.getatet); // This is not working   

Design:

  & lt; C1i: C1WebDateEdit id = "dtpstartdate" runat = "server" OnClientdateChanged = "javascript: enable (true);" WebCalendar = "postartdate" OnDateChanged = "dtpstartdate_DateChanged" & gt; & Lt; / c1i: C1WebDateEdit & gt;   

What could be the reason for this?

I recommend that you start by looking at the HTML produced by the C1WebDateEdit control and then find the input that That date holds the value. Once you know that it changes javascript to set the value of the input.

  var userid = '& lt;% = session ("user-id"). ToString% & gt; '; // 20-Dec-2013 var strdate = dtsheet.split ("-"); Var Sheetdate = New Date (Straddet [2] + "/" + Changemand (Straddet [1]) + "/" + Straddet [0]); Document.getElementById ('Id of generated input'). Value = sheetdate;    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -