Skip to content

Replace pickadate-rails with native date/time inputs - #2814

Open
mroderick wants to merge 4 commits into
masterfrom
feature/replace-pickadate-with-native-inputs
Open

Replace pickadate-rails with native date/time inputs#2814
mroderick wants to merge 4 commits into
masterfrom
feature/replace-pickadate-with-native-inputs

Conversation

@mroderick

@mroderick mroderick commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Remove the unmaintained pickadate-rails gem and replace its date/time pickers with native HTML5 input type="date" and input type="time".

All virtual attribute parsing (local_date, local_time, expires_at) already goes through DateTimeConcerns#datetime_from_fields, which uses Date.parse and Time.zone.parse — both accept the YYYY-MM-DD and HH:MM formats natively.

I decided to add more tests, i.e. new controller specs, in order to feel confident that tests would notify a contributor that things might break, if they change the inputs' type attributes.

Removed

  • pickadate-rails gem and Gemfile.lock entry
  • //= require pickadate/* from application.js
  • *= require pickadate/* from application.scss
  • jQuery init block calling .pickadate() and .pickatime()

Changed

  • Workshop, event, meeting forms: native date/time inputs with ISO-formatted values
  • Announcement and ban forms: date-only native inputs

New test coverage

  • Controller specs with render_views for every form: verify type="date"/type="time" inputs render and pre-fill with ISO format
  • Workshop edit: RSVP open/close date and time pre-fill verified
  • Announcement edit feature spec: updating expires_at date round-trips correctly

Test results

  • Controller specs: 100 examples, 0 failures
  • Feature specs: 180 examples, 0 failures

Manual verification steps

Start the app locally (bundle exec rails server), log in via GitHub OAuth as an admin, then:

1. Workshops — /admin/workshops/new

  • Create a workshop: verify native date picker for Date, native time pickers for Begins at and Ends at
  • Scroll to RSVP Timing: verify native date/time pickers for Open and Close
  • Fill all fields, save → "Workshop successfully created"
  • Edit the workshop → verify saved values pre-fill correctly in all date/time fields

2. Events — /admin/events/new

  • Create an event: verify native date picker for Date, native time pickers for Starts at and Ends at
  • Fill all fields, save → "Event successfully created"
  • Edit the event → verify saved values pre-fill correctly

3. Meetings — /admin/meetings/new

  • Create a meeting: verify native date picker for Local date, native time pickers for Starts at and Ends at
  • Fill all fields, save → "Meeting successfully created"
  • Edit the meeting → verify saved values pre-fill correctly

4. Announcements — /admin/announcements/new

  • Create an announcement: verify native date picker for Expires at (single input, not multiple dropdowns)
  • Save → "Announcement successfully created"
  • Edit the announcement → change Expires at, save → date persists

5. Bans — /admin/members/:id/bans/new (pick any member)

  • Verify native date picker for Date and default value is approximately 1 month from today
  • Pick a date, fill reason/note, save → ban created

Regression checks

  • No JavaScript errors in browser console (F12 → Console)
  • Date/time pickers look like native browser widgets, not styled pickadate widgets
  • Required fields still block submission when empty

@mroderick

Copy link
Copy Markdown
Collaborator Author

I verified this locally. I encourage reviewers to do the same.

@mroderick
mroderick requested a review from olleolleolle August 26, 2026 21:55
@mroderick
mroderick marked this pull request as ready for review August 26, 2026 21:55
Comment thread spec/controllers/admin/announcements_controller_spec.rb Outdated
Comment thread spec/controllers/admin/bans_controller_spec.rb Outdated
Comment thread spec/controllers/admin/meetings_controller_spec.rb Outdated

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a lovely reduction of footprint!

mroderick and others added 3 commits August 27, 2026 11:27
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
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.

2 participants