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
Guest User
Tech Writer
2.1k
459.5k
How to checked your datepicker in jquery using bootstrap?
Aug 26 2020 3:49 AM
Hi Team
I have this Razor @html.CheckboxFor(model=>model.LockUntil), i want this when i check it must bring datepicker for current month, time. This is what i have done below, its not working and there are no errors when i inspect.
<
div
class
=
"form-check"
>
<
div
class
=
"col-xl-2"
>
@Html.CheckBoxFor(
model
=
>
model.Lockuntil, new {
htmlAttributes
=
new
{ @
class
=
"form-control"
,
id
=
"checkbox"
} })
<
label
class
=
"form-check-label"
for
=
"@Html.IdFor(model=>model.Lockuntil)"
>
Lockuntil
</
label
>
</
div
>
</
div
>
@section srcipts{
<
script
src
=
"~/Scripts/jquery-ui-1.12.1.min.js"
>
</
script
>
<
script
type
=
"text/javascript"
>
$('#checkbox').change(function(){
if($(this).is(':checked')){
$( "#from" ).datepicker('setDate', new Date(2020, 08, 26)).datepicker( "option", "disabled", true );
}else{
$( "#to" ).datepicker( "option", "disabled", false);
}
});
});
</
script
>
}
Reply
Answers (
2
)
Please Help me in this and upload full method i am a beginner
How to Print From Hosted Webpage using c# webapplication