Skip to content

gopherjs: go "time" vs Date Issue #9

@cnguy

Description

@cnguy

Currently attempting to support the start property for heatmaps (heatmaps.go).

What my implementation looks like:

// interface
func (chartArgs *HeatmapArgs) WithStartDate(date time.Time) *HeatmapArgs {
	chartArgs.Start = date
	return chartArgs
// in main fn
charts.NewHeatmapChart("#chart", data).
		WithStartDate(time.Now()). // should work, but throws error
		Render()
}

JavaScript Console Error:

Error: runtime error: cannot internalize time.Time from undefined, must be Date

It seems others have had this issue (one issue was resolved in 2015, but it seems to have re-emerged in 2016).

Gonna try to think of a workaround for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions