Giter Club home page Giter Club logo

Comments (5)

ManfredTremmel avatar ManfredTremmel commented on July 18, 2024

Problem also exists in Firefox 58. Linux, Mac or Windows doesn't matter.

from webshim.

ManfredTremmel avatar ManfredTremmel commented on July 18, 2024

I've tried to analyze the problem, and it looks like Firefox >= 57 reports type of a datetime-local input element as text, so the detection fails and the input widget is not extended by webshim. You can test this with this simple html page:

<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<title>input datetime-local wrong type demonstration</title>
	</head>

	<body>
		<input id="datetimepicker" type="datetime-local"/>
		<script>window.alert(document.getElementById('datetimepicker').type);</script>
	</body>
</html>

The alert should report "datetime-local", but it reports "text".

from webshim.

ManfredTremmel avatar ManfredTremmel commented on July 18, 2024

What solves the problem: replace line 3610 in https://github.com/aFarkas/webshim/blob/gh-pages/js-webshim/dev/shims/combos/10.js
var type = $.prop(this, 'type');
with
var type = this.getAttribute('type');

from webshim.

bzbarsky avatar bzbarsky commented on July 18, 2024

it looks like Firefox >= 57 reports type of a datetime-local input element as text

This is true for Firefox < 57 as well. And it's correct behavior per spec, since Firefox doesn't impement any non-text processing for those input types.

from webshim.

ManfredTremmel avatar ManfredTremmel commented on July 18, 2024

Just done a view tests which type is reported

  • Firefox 52.6.0ESR -> text
  • Firefox 53.0.3 -> text
  • Firefox 54.0.1 -> text
  • Firefox 55.0.3 -> text
  • Firefox 56.0.2 -> text
  • Firefox 57.0.4 -> text
  • Firefox 58.0.2 -> text

You are right, it must be something else which causes the problem. What ever, I've done the changes in 10.js I've reported and it works. I've included the patched version in my project and Firefox 57 and 58 displays the datetime-local widget from webshim.

from webshim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.