This might be the first time I've put a cartoon poop in my blog.

I've been involved in this big refactoring at my day job.  That's when you take something you've already made, and you keep the good parts, and throw away, improve, or upgrade the rest.

The old way.  Perfectly serviceable, kind of ugly.

The old way.  Perfectly serviceable, kind of ugly.

Yesterday, and some of the day before I was researching ways to replace the jQueryUI Date Picker with something a bit more modern that fits into bootstrap.js's way of doing things.

The new hotness.  So shiny!

The new hotness.  So shiny!

I found something great, a js library called bootstrap-datepicker.  It's much prettier.  And it has way, WAY more configurable options for how it looks, what it does, and how to get it on your page.

However, there were some not-immediately-obvious things about it.

For one, the documentation was a bit unclear on exactly what files I needed to put into my project to use it.  After I dug around a bit, I figured out exactly which javascript file and which cascading style sheet I needed to go with my particular flavors of bootstrap and jQuery.

The other thing the documentation was none too specific about was whether or not I could use it commercially.  But I sussed that out too, eventually finding on the project's GitHub page a file for its license, which is an Apache License, meaning it was a-okay to use it.

So I download everything, put it where I think it needs to go, and get tinkering.  And it won't come up!  That was when I realized that while I had created an asset-pipeline manifest for the files, and put them where they need to go in my project, I hadn't actually put the required asset tags on the page where I was trying to use the feature.

They look kinda like this:

<asset:javascript src="cooljslibrary.js"/>
<asset:stylesheet href="coolcssfile.css"/>

I got them on the page where they should be, reloaded, and VOILA! 

And that was when I realized that I know my shit, meaning I also know I'm not shit.

AuthorMako Allen
Categories365 Gratitude