Page MenuHomePhabricator

Look into appropriate javascript widgets that can handle < 1970 dates.
Open, LowPublicFeature

Description

Author: muninn.project

Description:
As part of bug #62257 we need to have some means of having the user enter dates of interests into ID / rails. Most widgets out there don't handle <1970 years - are there any out there we can re-use or do we need to write our own.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz62900

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:07 AM
bzimport set Reference to bz62900.
bzimport added a subscriber: Unknown Object (MLST).

jaimelynschatz wrote:

Dateslider html, js and css files from google code repository (lic under Gnu GPL)

Attached:

jaimelynschatz wrote:

This looks promising. I'm still testing it out so I may say it stinks tomorrow am. On first glance, it looks like it uses the difference between dates and not the JavaScript data object/ since dawn of Unix time to determine dates and range.

Found at: http://code.google.com/p/dateslider/downloads/detail?name=Dateslider_v1.3.zip&can=2&q=

jaimelynschatz wrote:

Sleep is overrated. I couldn't resist messing with it a bit more. The date range in the background of the slider bar are hard-coded. Perhaps we could change it to a dynamic scale that works better with the zoom?

I've been poking around quite a bit and this is the most potentially flexible tool I've found so far. (With the exception of a time slider in the ArcGIS JavaScript API, but in my understanding that is not available under an open source license.)

Here's what I have so far (I haven't touched Example2.html, except to add it to my repo.)

https://github.com/JaimeLynSchatz/stc/tree/master/Dateslider

muninn.project wrote:

Looking at https://github.com/JaimeLynSchatz/stc/blob/master/Dateslider/js/dateslider.js there still seems to be some parsing using the Date object from the year / month / day integers. Javascript date has some issues [2] some of which have been fixed by jobatime [1].

An interesting question is how far we want to go with detail while keeping things sane. I'm tempted to have the slide work in two ways: basic modern date with a calendar (>1900) and year only to handle everything that is earlier.

This would avoid having to deal with the corner cases created by the tweaking of the gregorian calendar over the years.

[1] http://www.joda.org/joda-time/
[2] http://www.scholarslab.org/research-and-development/parsing-bc-dates-with-javascript/

jaimelynschatz wrote:

I've been playing with something new and am not sure where to post it for feedback.

http://jaimelynschatz.github.io/timeslider-mvp.html

(I know the 18th hasn't actually come around yet, but the problem wouldn't quiet down in my head and I wanted to see if I was on the right track.)

It still needs:

  1. To be translated to vanilla JS (I think I've seen Jquery as a default library in Rails, but not sure if it's being used for OHSM.)
  2. The hooks with the dates database.

If this isn't the best place for this, please let me know where things like this should go :).

cnrmcmanus wrote:

Here's a prototype of an interface I've been working on, just another idea to throw out there: http://themusictree.net/ohm/

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: wikibugs-l-list.