Special selection jquery Selectable

I have a calendar grid (for month). And I want to select period for event. Like at the picture:
Picture 1.
enter image description here

Picture 2.
enter image description here

How can I implement such a selection (when user drag down with the mouse over the cells (8, 15, 22 on picture) he selects all weeks that intersect the cells (picture 2)).
It seems, JQuery UI selectable plugin doesn’t help to make such selection (it would select only 3 cells (8, 15, 22)). Maybe it can or there are other libraries that helps to do that. Maybe It can be fixed with plain js…
Please, advise something.

Source: stackoverflow-javascript