Link to home
Create AccountLog in
Avatar of erikTsomik
erikTsomikFlag for United States of America

asked on

jquery ui datepicker on select update the database

I have a jquery ui datepicke. What I trying to do is on date selection update the database. And along with the date I need to pass the ID to the dataabse.

I do not seems to be able get it to work

<input id="3" class="datepicker hasDatepicker" type="text" value="" placeholder="Select Date..." readonly="readonly">


                        $(".datepicker").datepicker({
                              inline: true,
                              nextText: '&rarr;',
                              prevText: '&larr;',
                              showOtherMonths: true,
                              dateFormat: 'mm/dd/yy',
                              dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
                              showOn: "button",
                              buttonImage: "img/calendar-blue.png",
                              buttonImageOnly: true,
                               onSelect: function(date) {
                                     var val = $(this).attr('id');


                                },
                        });
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Hi,
which database? For updating data you normally have to use some kind of server side code rather than client side javascript.
Which type of ASP.NET web app do you have?
Thanks and HTH
Rainer
Avatar of erikTsomik

ASKER

it is OK. I will jquery ajax functiomn and pass the data to the server side. I just need to know why I can not pass it the ajax
DO wee have any updates on this
ASKER CERTIFIED SOLUTION
Avatar of Immanuel Phillips
Immanuel Phillips
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account