Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker issue multiple course offering #1341

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions app/static/css/createEvent.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.toggleHeader{
padding-bottom: 10px;
font-weight: bold;
font-weight: bold;
text-align: center;
margin-left: 50%; /* Position the header at 50% of the viewport width */
transform: translateX(-50%);
transform: translateX(-50%);
width: 170px
}
.columnDivide{
Expand All @@ -12,14 +12,17 @@
margin-left: 10px;
margin-right: -30px;
}.addMultipleBtn{
border-radius: 5px;
margin-left: auto;
border-radius: 5px;
margin-left: auto;
margin-right: auto;
}

.deleteOfferingBtn{
border-radius: 5px;
position:relative;
.deleteRow{
border-radius: 5px;
position:relative;
top: 12px;
}
.invalidFeedback {
Expand Down Expand Up @@ -49,9 +52,12 @@
}
}
.border-red {
border: 2px solid red;
border: 2px solid red;
}
.divStripes {
background-color: #fff
}

#ui-datepicker-div {
z-index: 4000 !important;
}
16 changes: 16 additions & 0 deletions app/static/js/createEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,22 @@ $(document).ready(function() {
$("#checkBonners").prop('checked', true);
}
}

// Initialize datepicker for multiple offering modal
$(".multipleOfferingDatePicker").datepicker({
dateFormat: 'mm/dd/yy',
minDate: new Date(),
onSelect: function() {
$(this).focus();
}
});

$(document).on('click', '.input-group-text, .multipleOfferingDatePicker', function (e) {
// Prevent click from showing datepicker when it's not the datepicker or calendar icon
e.stopPropagation();
$(this).closest('.input-group').find('.multipleOfferingDatePicker').datepicker('show');
});

// Initialize datepicker with proper options
$.datepicker.setDefaults({
dateFormat: 'yy/mm/dd', // Ensures compatibility across browsers
Expand Down
Loading