 				$target = $(ev.getTarget())
 				# CUI.debug "clicked on ", $target
 				if $target.closest(".cui-date-time-grid-hour").length
-					hour = DOM.data($target.closest("td")[0], "hour")
+					hour = DOM.data($target.closest("td,.cui-td")[0], "hour")
 					if @__input_format.clock_am_pm
 						current_hour = @__current_moment.hour()
 						if current_hour < 12 # AM

					cursor = "minute"

				if $target.closest(".cui-date-time-grid-minute").length
					@__current_moment.minute(DOM.data($target.closest("td")[0], "minute"))
					@__current_moment.second(0)
					cursor = "blur"



		# Wk, Mo, Tu, We, Th...
		tr = $tr("cui-date-time-month-header").appendTo(month_table)

		if CUI.__ng__
			td_func = $th
		else
			td_func = $td

		tr.append(td_func("cui-date-time-week-title").append($div("cui-date-time-dow").text(@__locale_format.tab_week)))
		for dow in [@start_day..@start_day+6]
			weekday = moment.weekdaysMin(dow%7)
			day_div = $div("cui-date-time-dow").text(weekday)
			day_div.addClass("cui-date-time-day-"+weekday.toLowerCase())
			tr.append(td_func().append(day_div))

		# Weeks
		mom.subtract((mom.day()-@start_day+7)%7, "days")
