TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abraham Olatubosun
NA
471
113.6k
Jquery datepicker value disappear after a submit button post
Sep 17 2018 12:56 PM
Hi,
i believe this question meet you all in good health,
My organisation have this application that save's patient clinic visit history written in VB.NET, i was asked to add some date validation rules to it so i used JQuery Datepicker. All worked fine till when patient record want to be saved, i found out that, the JQuery Datepicker always lost it value on the selected textbox when ever the
"Submit button is click" AutopostBack
issue.
And storing empty space as Date is invalid.
Any solution is highly appreciated.
Thank you all
<
link
href
=
"Content/bootstrap.min.css"
rel
=
"stylesheet"
/>
<
link
rel
=
"stylesheet"
href
=
"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"
/>
<
script
src
=
"https://code.jquery.com/jquery-1.12.4.js"
type
=
"text/javascript"
>
</
script
>
<
script
src
=
"https://code.jquery.com/ui/1.12.1/jquery-ui.js"
type
=
"text/javascript"
>
</
script
>
<
script
type
=
"text/javascript"
>
$(function () {
$("#
<
%=txtPat_disp_date.ClientID%
>
").datepicker({
dateFormat: "dd-mm-yy",
changeMonth: true,
changeYear: true,
maxDate: '0',
showButtonPanel: true
});
});
Dim
sql
As
String
=
"Insert into art_visit_adult (enrol_id,"
sql +=
"visit_date) VALUES(@enrol_id,@visit_date)"
Using d
As
New
SqlConnection(cons.ConnectMe)
d.Open()
Dim
cmd
As
New
SqlCommand(sql, d)
cmd.Parameters.AddWithValue(
"@enrol_id"
, DbType.
String
).Value = txtEnrol_id.Text.Trim
cmd.Parameters.AddWithValue(
"@visit_date"
, SqlDbType.SmallDateTime).Value = Convert.ToDateTime(txtVisit_date.Text.ToString())
cmd.ExecuteNonQuery()
d.Close()
cmd.Dispose()
Reply
Answers (
1
)
How to convert JSON response list to array in jquery
clicking on "sendtestmail" it is not sending