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

Timepicker issue #1288

Open
wants to merge 13 commits into
base: development
Choose a base branch
from
Open

Timepicker issue #1288

wants to merge 13 commits into from

Conversation

ali-ramazani
Copy link
Member

@ali-ramazani ali-ramazani commented Jul 22, 2024

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.

@ali-ramazani ali-ramazani self-assigned this Jul 22, 2024
@thealphagurlux
Copy link

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.

app/static/js/createEvents.js Outdated Show resolved Hide resolved
app/static/js/createEvents.js Outdated Show resolved Hide resolved
app/templates/admin/createEvent.html Outdated Show resolved Hide resolved
app/templates/admin/createEvent.html Outdated Show resolved Hide resolved
code formatting in JS file, removed console log
@JohnCox2211
Copy link
Contributor

Corrected things mentioned in comments

@thealphagurlux thealphagurlux self-assigned this Jul 23, 2024
@bledsoef bledsoef linked an issue Aug 22, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Sep 6, 2024

View Code Coverage

Copy link
Contributor

@bledsoef bledsoef left a 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 %}
Copy link
Contributor

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.

Copy link
Contributor

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
Copy link
Contributor

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',
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start Time and End Time time pickers are not working
5 participants