Datetimepicker script I'm working on my way to write most efficient, reusable and robust code, and this is why I'd like to receive some support. I've written a datetimepicker script that allows datetime chosing, and a shortcut button that will subtract from higher date (the right input) a variable number of minutes:

Is there a way to simplify my code even more?

&lt;form&gt; 
  &lt;input type="text" name="poczatek" id="od" /&gt; 
  &lt;input type="text" name="koniec" id="do" /&gt; 
  &lt;input type="button" value="10" class="odejmijCzas"/&gt; 
  &lt;input type="button" value="20" class="odejmijCzas"/&gt; 
  &lt;input type="button" value="30" class="odejmijCzas"/&gt; 
&lt;/form&gt;


JavaScript

dateTimeFormat = new Object();
dateTimeFormat.dwucyfrowa = function(m) {
    return m &lt; 10 ? '0' + m : m;
}
dateTimeFormat.format = function(date) {
    return date.getFullYear() + '-' + dateTimeFormat.dwucyfrowa(date.getMonth() + 1) + '-' + dateTimeFormat.dwucyfrowa(date.getDate()) + ' ' + dateTimeFormat.dwucyfrowa(date.getHours()) + ':' + dateTimeFormat.dwucyfrowa(date.getMinutes());
}
$(document).ready(function() {
    inputOd = $("#od");
    inputDo = $("#do");

    inputOd.add(inputDo).datetimepicker({
        changeMonth: 'true'
    });

    currentTime = new Date();
    inputOd.add(inputDo).val(dateTimeFormat.format(currentTime));

    $('.odejmijCzas').click(function() {
        odejmijCzas($(this).attr('value'));
    });
});

function odejmijCzas(liczbaMinut) {
    czasDo = new Date(inputDo.val());
    roznicaCzasu = czasDo.getTime() - liczbaMinut * 1000 * 60;
    czasOd = new Date();
    czasOd.setTime(roznicaCzasu);
    inputOd.val(dateTimeFormat.format(czasOd));
}​
A quick review:

High Level Overview

This code is okay except for 2 major items: you are not declaring your variables, making them escape all scope. And you use non-English variable names and function names, not every developer speaks Polish, though we should all understand English.

Naming


English is the one true language for naming, please find English equivalents for odejmijCzas, roznicaCzasu etc.


Idioms and Custom


Do not use = new Object();, use = {}


Scope


You must declare everything with var, let, or const
I would declare dateTimeFormat and odejmijCzas inside $(document).ready(function() { to keep the namespace clean 


JSHint.com


Consider using http://jshint.com/ to perfect your code, most of these items were found by this tool as well