Skip to content

Instantly share code, notes, and snippets.

View radubrehar's full-sized avatar

Radu Brehar radubrehar

View GitHub Profile
@radubrehar
radubrehar / date-input.jsx
Created October 16, 2015 11:09
react-date-picker input integration
import React from 'react'
import assign from 'object-assign';
import Input from 'react-filed';
import join from 'classnames';
import DatePicker from 'react-date-picker';
import moment from 'moment';
import ClassName from './index.local.styl';
export default class DateInput extends React.Component {
@radubrehar
radubrehar / uri.js
Created September 20, 2012 11:53 — forked from jlong/uri.js
URI Parsing with Javascript - current window location
var parser = document.createElement('a');
parser.href = window.location.href;
//if the current page location is "http://example.com:3000/pathname/?search=test#hash";
//we get the following
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
@radubrehar
radubrehar / uri.js
Created April 26, 2012 13:15 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"