Congratulations - C# Corner Q4, 2022 MVPs Announced
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Gcobani Mkontwana
1k
1.5k
255.7k
select checboxfor to call datepicker with time in jquery?
Aug 21 2020 5:01 AM
Hi Team
I have a checkboxfor, but i want to select it using jquery to call datepicker. How do i achieve such from below meaning it must have time?
<div
class
=
"form-check"
>
<div
class
=
"col-xl-2"
>
@Html.CheckBoxFor(model => model.Lockuntil,
new
{ @
class
=
"form-check-input"
})
<label
class
=
"form-check-label"
for
=
"@Html.IdFor(model=>model.Lockuntil)"
>Lockuntil</label>
</div>
</div>
$(
"#datepicker"
).datepicker({
regional:
"da"
,
constrainInput:
true
,
showWeek:
true
,
showTime:
true
// allowed?
});
$(
"#dataLocker"
).change(
function
() {
if
(
this
.checked) {
$(
"#datepicker"
).prop(
"disabled"
,
false
);
}
else
{
$(
"#datepicker"
).prop(
"disabled"
,
true
);
}
});
Reply
Answers (
1
)
In Web API : No action found on Account controller
C#.NET 3 and WiN10 API