Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopherjs: go "time" vs Date Issue #9

Open
cnguy opened this issue Jan 25, 2018 · 0 comments
Open

gopherjs: go "time" vs Date Issue #9

cnguy opened this issue Jan 25, 2018 · 0 comments
Labels

Comments

@cnguy
Copy link
Owner

cnguy commented Jan 25, 2018

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.

@cnguy cnguy added the bug label Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant