Disable date picker



  • Is it possible to disable Date picker in forms? I don't find it useful and while using tab it forces me to push a couple times more (and if I have to go over the similar form multiple times this gets more annoying).



  • No, you can't to remove them.

    But you can use Spatial Navigation (Shift+Cursorkey) to select other parts on a webpage.



  • That's a bummer.

    And no, I can't use Spatial Navigation it seems. As I said - I have a web form with a couple of fields so:

    • it doesn't work with plain textfield (single line) - it simply stays in the field
    • with textarea it selects the text (logically)...

    It would really be cool to allow disabling some none-standard features...



    1. Open a text editor
    2. Copy this code
    3. Save as file Disable_Datepicker.user.js
      // ==UserScript==
      // @name DisableHTML5Date
      // @author Lilo von Hanffstengel // GwenDragon
      // @match http://*/* 
      // @match https://*/* 
      // ==/UserScript==
      (function () { 
          var inputs = document.getElementsByTagName("input");
          for (var i = 0; i < inputs.length; i++) {
              if (inputs[i].type && inputs[i].getAttribute('type',0) == 'date')
                  inputs[i].setAttribute('type','text',0);
          }
      })();
      
    4. Open Vvaldi'S Extension Manager (Ctrl+Shift+E)
    5. Drop file Disable_Datepicker.user.js on Extensiosn Manager page

    Now all your bad HTML5 date pickers are gone.
    //UPDATE: updated UserJS , should work better now
    Please tell me if something does not work.

    If you need only to remove the date picker on a special domain add such domains like // @match https://example.dom/*
    and remove the @match http://*… or @match https://… lines
    See https://www.chromium.org/developers/design-documents/user-scripts for syntax.



  • yay! worked like a charm - thanks! (also - no need to be sarcastic ;) ).



  • If you want to catch week and time pickers:

    // ==UserScript==
    // @name DisableHTML5Date
    // @author Lilo von Hanffstengel // GwenDragon
    // @match http://*/*
    // @match https://*/*
    // ==/UserScript==
    
    (function () { 
       var inputs = document.getElementsByTagName("input");
       for (var i = 0; i < inputs.length; i++) {
          if (inputs[i].type 
    		  && (
    		       inputs[i].getAttribute('type',0) == 'date' 
    		       || inputs[i].getAttribute('type',0) == 'week' 
    		       || inputs[i].getAttribute('type',0) == 'time' 
    		     )
    		 )	        	     
             inputs[i].setAttribute('type','text',0);
       }
    })();
    

    tested on https://www.wufoo.com/html5/types/4-date.html



  • @wojtek said in Disable date picker:

    (also - no need to be sarcastic ).

    Where i was sarcastic to you!? If yes, i did not realize (me is a non-english person) and apologize. :peace:



  • nice job @Gwen-Dragon



  • I was playing with it a bit and here's the modified version:

    (function() {
        'use strict';
    
        var types = ['date','week','time'];
        var inputs = document.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
          if (inputs[i].type && types.includes(inputs[i].type))
             inputs[i].setAttribute('type','text',0);
        }
    })();
    

    @gwen-dragon said in Disable date picker:

    Now all your bad HTML5 date pickers are gone.

    I thought this was a bit sarcastic but in a funny way - no offence was taken nor I felt insulted or something :-)

    PS. I'm also non-english :-)



  • @wojtek said in Disable date picker:

    @gwen-dragon said in Disable date picker:
    Now all your bad HTML5 date pickers are gone.

    I thought this was a bit sarcastic but in a funny way

    No my answer it was meant as a fact without any judging.



  • OK. It's me again :D

    There is a slight problem with the above solution -- it disables date picker everywhere -- even if the website provides it's own one.

    And I've realised my main "problem" with build-in date picker is that it suddenly makes the filed contains "3 items" (separate date parts) instead of one, which is mostly annoying when using keyboard for input...

    Bottomline - it would be cool if vivaldi wouldn't provide it's own date picker and left it to websites...



  • @wojtek said in Disable date picker:

    it disables date picker everywhere -- even if the website provides it's own one.

    Perhaps you find your own idea to solve it. There is no quick solution how to check if the page uses its own better date picker instead of HTML5.
    And i do not want to waste my time to make a extension for this, too much work and less honor.

    @wojtek said in Disable date picker:

    it would be cool if vivaldi wouldn't provide it's own date picker

    Your problem is accessibility? The please report a bug/feature request to Vivaldi.


    If you found a bug, please report the issue to the developers to fix it.

    How to do a bugreport for Vivaldi
    Report each bug seperately at https://vivaldi.com/bugreport/
    Describe the issue as precise as you can.
    Add some information about extensions you use.
    Add information about the operating system and version you use.
    If you have problems with video or audio give us information about your installed codecs and graphics card/GPU.
    Add a exact link to the page where the issue comes up and can be tested.
    After reporting the issue, you will receive a confirmation mail from the bugtracker.
    In a reply to this mail you can add more information and files (like screenshots or testcases) as attachments and it will be added automatically to bug report.
    If you have questions about the bug please ask in forum first and do not forget to post the VB-XXXXX bug number (you can find it in confirmation mail).

    Thanks in advance for helping us to make Vivaldi better!




  • @wojtek said in Disable date picker:

    it would be cool if vivaldi wouldn't provide it's own date picker

    Your problem is accessibility? The please report a bug/feature request to Vivaldi.

    Thanks, done: VB-32495 :thumbsup:



  • What is date picker? I thought that is date picker - s. Screenshot.

    0_1505118279357_Date_Picker.png

    I installed this Version Disable_ Datepicker.user.js

    (function() {
        'use strict';
        var types = ['date','week','time'];
        var inputs = document.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
          if (inputs[i].type && types.includes(inputs[i].type))
             inputs[i].setAttribute('type','text',0);
        }
    })();
    

    But how can I test, that Disable_ Datepicker.user.js




Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.