-
Notifications
You must be signed in to change notification settings - Fork 8
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
Timepicker issue #1288
base: development
Are you sure you want to change the base?
Timepicker issue #1288
Conversation
To add on to Ali's comment, we also implemented an if else statement into the function bound to the button because the button would open the time picker scroll but clicking it again would not close the scroll box, so we used the time pickers 'closed' method in order to check if the scroll box was open or not, and close and open it appropriately. |
code formatting in JS file, removed console log
Corrected things mentioned in comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like merge conflicts might have caused some issues.
@@ -452,6 +451,7 @@ <h5 class="modal-title" id="renewModel">Renew Event</h5> | |||
</div> | |||
</div> | |||
</form> | |||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This endblock is messing up styling on the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was initially just styling but now it is breaking completely for me
@@ -136,7 +134,23 @@ function storeMultipleOfferingEventAttributes() { | |||
let entries = []; | |||
$(".extraSlots").children().each(function(index, element) { | |||
let rowData = $.map($(element).find("input"), (el) => $(el).val()); | |||
// Initialize timepicker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation on this timepicker block of code is weird and the .extraSlots function does not close, causing some errors on my end.
interval: 15, | ||
minTime: '12:00am', | ||
maxTime: '11:45pm', | ||
defaultTime: '11:00am', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am now hitting errors, but before I was I saw that the time for both time pickers was 11:00 am. We want to by default have the times an hour apart. For instance start time is noon and end time is 1pm.
Fixes issue #1267
We fixed the issue with the start time and end time buttons not triggering the timepicker dropdown attached to the input field. The issue was the timepicker method in the timepicker object didn't expect "show" as argument. Instead, it expected "open". Moreover, we prevent the event handler from propagating up because it would close the dropdown as in the implementation of the timepicker closes the dropdown if it's not trigged from the input field directly.